Recall & Review
beginner
What does the SQL EXCEPT operator do?
The EXCEPT operator returns rows from the first query that are not present in the second query. It shows the difference between two result sets.
Click to reveal answer
beginner
How is EXCEPT different from UNION in SQL?
UNION combines rows from two queries, removing duplicates, while EXCEPT returns only rows from the first query that do not appear in the second.
Click to reveal answer
intermediate
Which SQL keyword is equivalent to EXCEPT in some databases like Oracle?
MINUS is equivalent to EXCEPT in Oracle and some other databases. Both return the difference between two queries.
Click to reveal answer
intermediate
Can EXCEPT be used with queries that return different columns?
No, both queries must return the same number of columns with compatible data types for EXCEPT to work.
Click to reveal answer
beginner
What happens if you use EXCEPT and the second query returns rows not in the first query?
Those rows are ignored because EXCEPT only returns rows from the first query that are missing in the second.
Click to reveal answer
What does the EXCEPT operator return in SQL?
✗ Incorrect
EXCEPT returns rows from the first query that do not appear in the second query.
Which SQL keyword is similar to EXCEPT in Oracle?
✗ Incorrect
MINUS in Oracle works like EXCEPT, showing rows in the first query not in the second.
What must be true about the columns in queries used with EXCEPT?
✗ Incorrect
Both queries must return the same number of columns with compatible types for EXCEPT to work.
If the second query returns rows not in the first, what does EXCEPT return?
✗ Incorrect
EXCEPT returns only rows from the first query that are missing in the second.
Which of these is NOT a set operation in SQL?
✗ Incorrect
SELECT is a basic query, not a set operation like EXCEPT, MINUS, or UNION.
Explain how the EXCEPT operator works in SQL and when you might use it.
Think about comparing two lists and finding what is unique to the first.
You got /3 concepts.
Describe the difference between EXCEPT and UNION in SQL.
One combines, the other subtracts.
You got /3 concepts.