Previous Topic: Example 3Next Topic: Description


DESCRIBE

This SQL statement can be executed in the following ways:

Through the CA Datacom Datadictionary Interactive SQL Service Facility (interactive)

In an application program prepared using a CA Datacom/DB SQL Preprocessor (embedded)

By using CA Dataquery (SQL & Batch Modes)

DESCRIBE

 

YES

 

Note: YES indicates a valid execution method for this statement.

The DESCRIBE statement obtains information about a specified table or view, or about a prepared statment.

Note: When you use the PREPARE statement to create an executable SQL statement from a character string form of the statement, the executable form is called a prepared statement. Information about a prepared statement can also be obtained by using the INTO clause of the PREPARE statement. See PREPARE for more information about PREPARE.

No authorization is required to DESCRIBE a prepared statement, but to execute a DESCRIBE TABLE statement you must hold at least one of the following authorizations:

Note: Because the table name is not known at prepare time, security checks for this statement are always performed at execution time regardless of plan security options.

Following is the syntax diagram for the DESCRIBE statement:

►►─ DESCRIBE ─┬─ statement-name ─────┬─ INTOdescriptor-name ──────────────────►
              └─ TABLEhost-variable ─┘

 ►─┬───────────────────────┬──────────────────────────────────────────────────►◄
   └─ USING ─┬─ NAMES ◄ ─┬─┘
             ├─ LABELS ──┤
             ├─ ANY ─────┤
             └─ BOTH ────┘