Understanding Set Operators
Introducing Set Operators
You can combine the
results of two or more queries by using set operators. Each of the
four set operators—EXCEPT, INTERSECT, UNION, and OUTER UNION—selects
rows and handles columns in a different way, as described below.
Note: In the comparison below, Table 1 is the table that is
referenced in the first query, and Table 2 is the table that is referenced
in the second query.
Set Operator
|
Treatment of Rows
|
Treatment of Columns
|
Example
|
---|---|---|---|
EXCEPT
|
Selects unique rows
from the first table that are not found in the second table.
|
Overlays columns based on their position in the ... |
Get SAS Certified Professional Prep Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.