A set operation combines
tables or views vertically (one on top of the other) by combining
the results of two queries. A set operation is a SELECT statement
that contains
-
two queries (each beginning with
a SELECT clause)
-
one of the set operators EXCEPT,
INTERSECT, UNION, and OUTER UNION
-
one or both of the keywords ALL
and CORR (CORRESPONDING) as modifiers.
A single SELECT statement
can contain multiple set operations.
When processing a set operation that displays only unique rows (a set operation that contains the set operator EXCEPT, INTERSECT, or UNION), PROC SQL makes two passes through the data, by default. For set operations that display both unique and duplicate rows, ...