|
PROC SQL is SAS' implementation of Structured Query Language (SQL), which is a standardized language that is widely used to retrieve and update data in tables and in views that are based on those tables. The following chart shows terms used in data processing, SAS, and SQL that are synonymous. The SQL terms are used in this lesson. |
| Data Processing | SAS | SQL |
| file | SAS data set | table |
| record | observation | row |
| field | variable | column |
PROC SQL can often be used as an alternative to other
SAS procedures or the DATA step. You can use PROC SQL to
Like other SAS procedures, PROC SQL also enables you to combine data from two or more different types of data sources and present them as a single table. For example, you can combine data from two different types of external databases, or you can combine data from an external database and a SAS data set. |

| How PROC SQL Is Unique PROC SQL differs from most other SAS procedures in several ways:
|
|
|
1884 proc sql; 1885 select empid,jobcode,salary, 1886 salary*.06 as bonus 1887 from sasuser.payrollmaster 1888 where salary<32000 1889 order by jobcode; 1890 run; NOTE: PROC SQL statements are executed immediately; |
|
|