- Supports the standard SQL syntax:
except [distinct]
Non-standard Feature
This functionality is not described by the SQL standard ISO/IEC 9075-2:2023. Prefer using the more widely supported except [distinct].
The table operator minus returns the rows of the first result except those that are also in the second.
SELECT …
FROM …
MINUS
SELECT …
FROM …As with all table operators both sides of except must have the same number of columns and their types must be compatible based on their position (see corresponding). All null values are considered being the same (not distinct) for this operation.
If a row exists in the second result it will not appear in the final result—not even if it is multiple times in the first result.
Related
Same functionality in standard SQL:
except [distinct]Other table operators:
Union:
union [distinct],union allIntersect:
intersect [distinct],intersect all
Normative References
The table operation minus is not covered by any international standard.

