
Determining the Structure of a Table
To obtain a list of all of the columns in a table and their attributes, you can use the
DESCRIBE TABLE statement. The following example generates a description of the
Sql.UnitedStates table. PROC SQL writes the description to the log.
libname sql 'SAS-library';
proc sql;
describe table sql.unitedstates;
Log 2.1 Portion of Log to Determine the Structure of a Table
NOTE: SQL table SQL.UNITEDSTATES was created like:
create table SQL.UNITEDSTATES( bufsize=12288 )
(
Name char(35) format=$35. informat=$35. label='Name',
Capital char(35) format=$35. informat=$35. label='Capital',
Population num format=BEST8. informat=BEST8. ...