For the complete documentation index, see llms.txt. This page is also available as Markdown.

Set Operations

SQL set operations combine the results of multiple query blocks in a single result, using the standard SQL operators EXCEPT, INTERSECT, and UNION, and the Oracle operator MINUS.

Control the execution order of UNION, EXCEPT, and INTERSECT operations. Learn how to use parentheses to define explicit operation priority.

Return rows from the first result set that do not appear in the second. This set operator performs a subtraction of two datasets.

Return only the rows that appear in both result sets. INTERSECT implicitly applies DISTINCT and follows the same column-naming, ORDER BY, and LIMIT rules as UNION.

Oracle-compatible synonym for the EXCEPT operator. It returns rows from the first query that are not present in the second query.

Combine results from multiple SELECT statements into a single result set. This operator can optionally remove duplicates or include all rows.

This page is licensed: CC BY-SA / Gnu FDL

Last updated

Was this helpful?