PROC SQL is the 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 chapter. A SAS data set (or SAS data
file) can be a table or a view.
Data Processing
|
SAS
|
SQL
|
file
|
SAS data file
|
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 do the following:
-
retrieve data from and manipulate
SAS tables
-
add or modify data values in a
table
-
add, modify, or drop columns in
a table
-
-
join multiple tables (whether they
contain columns with the same name)
-
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.