Using the EXCEPT Set Operator
A Brief Overview
The set operator EXCEPT does
both of the following:
-
selects unique rows from the first table (the table specified in the first query) that are not found in the second table
-
overlays columns
Figure 4.1 EXCEPT Set Operator Relationship
Example: Using the EXCEPT Operator Alone
Suppose you want to
display the unique rows in table Col1 that are not found in table
Col2. The PROC SQL set operation that includes the EXCEPT operator,
the tables Col1 and Col2, and the output of the set operation are
shown below.
proc sql;
select *
from certadv.col1 except select * from certadv.col2; ...
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.