Displays a PROC SQL
definition in the SAS log.
DESCRIBE TABLE table-name <, ... table-name>;
|
DESCRIBE
VIEW proc-sql-view <, ... proc-sql-view>;
|
DESCRIBE TABLE CONSTRAINTS
table-name <, ... table-name>;
|
- table-name
-
specifies a PROC SQL table. table-name
can be a one-level name, a two-level libref.table
name, or a physical pathname that is enclosed in single quotation marks.
- proc-sql-view
-
specifies a PROC SQL view. proc-sql-view
can be a one-level name, a two-level libref.view
name, or a physical pathname that is enclosed in single quotation marks.
-
The DESCRIBE TABLE statement writes a CREATE TABLE statement to
the SAS log for the table specified in the DESCRIBE TABLE statement, regardless
of how the table was originally created (for example, with a DATA step). If
applicable, SAS data set options are included with the table definition. If
indexes are defined on columns in the table, then CREATE INDEX statements
for those indexes are also written to the SAS log.
When you are transferring a table to a DBMS that SAS/ACCESS software
supports, it is helpful to know how it is defined. To find out more information
about a table, use the FEEDBACK option or the CONTENTS statement in the DATASETS
procedure.
-
The DESCRIBE VIEW statement writes a view definition to the SAS
log. If you use a PROC SQL view in the DESCRIBE VIEW statement that is based
on or derived from another view, then you might want to use the FEEDBACK option
in the PROC SQL statement. This option displays in the SAS log how the underlying
view is defined and expands any expressions that are used in this view definition.
The CONTENTS statement in DATASETS procedure can also be used with a view
to find out more information.
-
The DESCRIBE TABLE CONSTRAINTS statement lists the integrity constraints
that are defined for the specified table or tables. However, names of the
foreign key data set variables that reference the primary key constraint will
not be displayed as part of the primary key constraint's DESCRIBE TABLE output.
![](../../../../common/63294/HTML/default/images/spacer.gif) |
![](../../../../common/63294/HTML/default/images/spacer.gif) |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.