|
|
DESCRIBE
DESCRIBEgathers information on the result-set or dynamic variable specifications in a prepared statement and places the information in an SQL descriptor area.Usage
Description
Information concerning the prepared statement identified by
statement-nameis placed in the named SQL descriptor area.The
DESCRIBEstatement and theDESCRIBE OUTPUTstatement are equivalent, and gather information on the items in the result-set of the statement and places it in the SQL descriptor area.The
DESCRIBE INPUTstatement describes the statement's input and output variables.The
DESCRIBE OUTPUTstatement describes the result-set returned by the statement (aSELECTor aCALLto a result set procedure).If descriptions of both the result set and the input variables are required for a prepared statement, the statement must be described separately with each form of
DESCRIBE.The
descriptor-nameis identified by a host variable or a literal.
WITHOUT NESTINGis implicit. IfNESTINGis specified, a structured user-defined type will result in a subordinate descriptor, which means that the structured type's attributes will be be included in the description.See ALLOCATE DESCRIPTOR for a description of the SQL descriptor area.
See ALLOCATE CURSOR for a description of extended statements.
See also, GET DESCRIPTOR.
Restrictions
The
DESCRIBEstatement is only applicable to dynamically prepared SQL statements.Examples
exec sql ALLOCATE DESCRIPTOR 'DescrIn'; exec sql ALLOCATE DESCRIPTOR 'DescrOut'; sqlstr = 'SELECT * FROM tab1 WHERE col1 = ? and col2 = ?'; exec sql PREPARE 'stmt X1' FROM :sqlstr; exec sql DESCRIBE INPUT 'stmt X1' USING SQL DESCRIPTOR 'DescrIn'; exec sql DESCRIBE OUTPUT 'stmt X1' USING SQL DESCRIPTOR 'DescrOut'; sqlstr = 'CALL proc(?, ?, ?)'; exec sql PREPARE stmt2 FROM :sqlstr; exec sql DESCRIBE INPUT stmt2 USING SQL DESCRIPTOR :SQLA1;For more information, see the Mimer SQL Programmer's Manual, Describing Prepared Statements.
Standard Compliance
|
Mimer Information Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 info@mimer.se |
|
|