POSTGRESQL DATABASE INTERVIEW QUESTIONS
What is the difference between UNION and UNION ALL in PostgreSQL?
When would you use UNION instead of UNION ALL in PostgreSQL?
Can you use ORDER BY with UNION or UNION ALL in PostgreSQL?
How does the performance of UNION compare to UNION ALL in PostgreSQL?
What are some use cases where UNION ALL is preferred over UNION in PostgreSQL?
Is it possible to use UNION or UNION ALL with different numbers of columns in the SELECT queries in PostgreSQL?
What happens if the column names are different in the SELECT queries used with UNION or UNION ALL in PostgreSQL?
Can you use UNION or UNION ALL in a subquery in PostgreSQL? Provide an example scenario where this might be useful.
How does PostgreSQL handle NULL values when using UNION and UNION ALL?
Describe a scenario where using UNION ALL would significantly improve query performance in a PostgreSQL database with large datasets.
