Method of Creating a
Table
|
Example
|
---|---|
create an empty table
by defining columns
|
proc sql;
create table work.discount
(Destination char(3),
BeginDate num Format=date9.,
EndDate num format=date9.,
Discount num); |
create an empty table
that is like (has the same columns and attributes as) an existing
table
|
proc sql; create table work.flightdelays2 like sasuser.flightdelays; |
create a populated table
(a table with both columns and rows of data) from a query result
|
proc sql; create table work.ticketagents as select lastname, firstname, jobcode, salary from sasuser.payrollmaster, sasuser.staffmaster where payrollmaster.empid = staffmaster.empid and jobcode contains 'TA'; |