Complete the SQL query to find all unique records from two tables using union.
SELECT * FROM table1 [1] SELECT * FROM table2;The UNION operator combines results from two queries and removes duplicates.
Complete the SQL query to find common records between two tables.
SELECT * FROM table1 [1] SELECT * FROM table2;The INTERSECT operator returns only the records that appear in both tables.
Fix the error in the SQL query to find records in table1 but not in table2.
SELECT * FROM table1 [1] SELECT * FROM table2;The EXCEPT operator returns records from the first query that are not in the second query.
Fill both blanks to create a query that finds records in table1 but not in table2, and removes duplicates.
SELECT [1] * FROM table1 [2] SELECT * FROM table2;
Use EXCEPT to find records in table1 not in table2, and DISTINCT to remove duplicates.
Fill all three blanks to create a query that finds records common to both tables and orders them by id.
SELECT * FROM table1 [1] SELECT * FROM table2 ORDER BY [2] [3];
INTERSECT finds common records, and ORDER BY id ASC sorts results by id in ascending order.