DESCRIBE statement [ESQL]
500
DESCRIBE statement [ESQL]
Use this statement to get information about the host variables required to
store data retrieved from the database, or host variables required to pass data
to the database.
DESCRIBE
… [ USER TYPES ]
… [ ALL
| BIND VARIABLES FOR
| INPUT
| OUTPUT
| SELECT LIST FOR
]
… [ LONG NAMES [
long-name-spec
] | WITH VARIABLE RESULT ]
… [ FOR ] {
statement-name
| CURSOR
cursor-name
}
… INTO
sqlda-name
long-name-spec:
OWNER.TABLE.COLUMN | TABLE.COLUMN | COLUMN
statement-name:
{
identifier
|
host-variable
}
cursor-name: declared
cursor
sqlda-name: identifier
None.
None.
"ALLOCATE DESCRIPTOR statement" on page 381
"DECLARE CURSOR statement" on page 488
"OPEN statement" on page 570
"PREPARE statement" on page 578
The DESCRIBE statement sets up the named SQLDA to describe either the
OUTPUT (equivalently SELECT LIST) or the INPUT (BIND
VARIABLES) for the named statement.
In the INPUT case, DESCRIBE BIND VARIABLES does not set up the data
types in the SQLDA: this needs to be done by the application. The ALL
keyword allows you to describe INPUT and OUTPUT in one SQLDA.
If you specify a statement name, the statement must have been previously
prepared using the PREPARE statement with the same statement name and
the SQLDA must have been previously allocated (see the "ALLOCATE
DESCRIPTOR statement" on page 381).
Function
Syntax
Permissions
Side effects
See also
Description