This topic describes the INTERSECT clause.

Syntax

The following statement provides the syntax of the INTERSECT clause:

select_statement INTERSECT select_statement

Description

select_statement is a SELECT statement that does not contain an ORDER BY or FORUPDATE clause.

The 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 UNION clause. A UNION B INTERSECT C is read as A UNION (B INTERSECT C).