Chapter Contents |
Previous |
Next |
The SQL Procedure |
See also: | Query Expressions (Subqueries) |
<NOT> EXISTS (query-expression) |
query-expression is described in query-expression .
Details |
CT
in PROCLIB.STAFF (which is shown in Joining Two Tables ), the
matching IDNUM in PROCLIB.PAYROLL is included in the output. Thus, the query
returns all the employees from PROCLIB.PAYROLL who live in CT
.
proc sql; select * from proclib.payroll p where exists (select * from proclib.staff s where p.idnumber=s.idnum and state='CT');
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.