Complete the code to select all rows from table1 that are not in table2.
SELECT * FROM table1 [1] SELECT * FROM table2;The EXCEPT keyword returns rows from the first query that are not present in the second query.
Complete the code to find customers in orders2023 but not in orders2022.
SELECT customer_id FROM orders2023 [1] SELECT customer_id FROM orders2022;EXCEPT returns customers present in 2023 orders but missing in 2022 orders.
Fix the error in the code to get products in inventory2024 but not in inventory2023.
SELECT product_id FROM inventory2024 [1] SELECT product_id FROM inventory2023;The correct keyword to find differences is EXCEPT. UNION ALL or INTERSECT do not return differences.
Fill both blanks to find employees in deptA but not in deptB, selecting only their IDs and names.
SELECT [1] FROM deptA [2] SELECT employee_id, name FROM deptB;
Select specific columns employee_id, name and use EXCEPT to find employees only in deptA.
Fill all three blanks to find unique product codes in warehouse1 but not in warehouse2, selecting code, name, and quantity.
SELECT [1] FROM warehouse1 [2] SELECT [3] FROM warehouse2;
Select matching columns product_code, name, quantity and use EXCEPT to find products only in warehouse1.