Performing Queries Using SQL |
Querying Multiple
Tables |
Specifying Multiple Table Names
When you join multiple tables in a query, you specify each table name in the FROM clause, as shown below. |
proc sql; select bldginfo.id,lastname,building,room,extension from emplib.payroll,emplib.bldginfo where bldginfo.id=payroll.id order by lastname; |
As in the SELECT clause, you separate names in the FROM clause with commas. |
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.