EXCEPT Operator
The SQL EXCEPT
operator takes the distinct rows of one query and returns the rows that do not appear in a second result set. The EXCEPT ALL
operator (not supported in MSSQL) does not remove duplicates. For purposes of row elimination and duplicate removal, the EXCEPT
operator does not distinguish between NULLs
.
Notably, the Oracle platform provides a MINUS
operator which is functionally equivalent to the SQL standard EXCEPT DISTINCT
operator .
Read more about this topic: Set Operations (SQL)