DESCRIBE VIEW Statement

Retrieves SQL from a view and returns a result set.

Category: Data Definition
Data source: SAS data set, SPD Server table, Aster, DB2 under UNIX and PC, Greenplum, HAWQ, Impala, MDS, MySQL, Netezza, ODBC, Oracle, PostgreSQL, SAP HANA, Teradata

Syntax

DESCRIBE VIEW ["catalog".]["schema".]"view"
DESCRIBE VIEW XML ["catalog".]["schema".]"view"

Arguments

catalog

specifies the catalog that contains the view.

schema

specifies the schema that contains the view.

view

specifies the name of the view.

Details

Use DESCRIBE VIEW to retrieve standard SQL text from a view. Use DESCRIBE VIEW XML to retrieve SQL from a view as XML. This eliminates the need to implement an SQL parser on the client.
You must have ALTER VIEW privilege to run DESCRIBE VIEW on a secured view.

See Also

Statements:
Last updated: February 23, 2017