This topic describes the INTERSECT clause.
The following statement provides the syntax of the
select_statement INTERSECT select_statement
select_statement is a
SELECT statement that does not contain an
ORDER BY or
INTERSECT operator computes the set intersection of the rows that are returned by the involved
SELECT statements. If a row is included in two result sets, the row is in the intersection of the two result sets.
The result of the
INTERSECT clause does not contain duplicate rows.
Unless otherwise specified in parentheses, multiple
INTERSECT operators in the same
SELECT statement are evaluated from left to right. The
INTERSECT clause binds tighter than the
A UNION B INTERSECT C is read as
A UNION (B INTERSECT C).