Final answer:
The EXCEPT operator in SQL removes duplicates from the first result set that appear in a second result set. Option 3: EXCEPT is the correct answer to the student's question. Other options such as UNION, INTERSECT, and JOIN serve different purposes in SQL.
Step-by-step explanation:
The EXCEPT operator in SQL is used to remove all tuples (rows) from the first result set that also exist in the second result set. When comparing the given options, Option 3: EXCEPT is the correct answer. This operator compares two result sets and returns only those tuples that are in the first set but not in the second. Here's a simple example:
- Result set 1: (A, B, C)
- Result set 2: (B, C, D)
- EXCEPT operation: (A)
The other options provided are different SQL set operations:
- UNION combines the result sets of two queries without duplicates.
- INTERSECT returns the common elements between two result sets.
- JOIN combines rows from two or more tables based on a related column.