Name
DESCRIBE -- obtain information about a prepared statement or result set
Synopsis
DESCRIBE [ OUTPUT ] prepared_name USING SQL DESCRIPTOR descriptor_name
DESCRIBE [ OUTPUT ] prepared_name INTO SQL DESCRIPTOR descriptor_name
Description
DESCRIBE retrieves metadata information about the result columns contained in a prepared statement, without actually fetching a row.
Parameters
The name of a prepared statement. This can be an SQL identifier or a host variable.
A descriptor name. It is case sensitive. It can be an SQL identifier or a host variable.
Examples
EXEC SQL ALLOCATE DESCRIPTOR mydesc END-EXEC. EXEC SQL PREPARE stmt1 FROM :sql_stmt END-EXEC. EXEC SQL DESCRIBE stmt1 INTO SQL DESCRIPTOR mydesc END-EXEC. EXEC SQL GET DESCRIPTOR mydesc VALUE 1 :charvar = NAME END-EXEC. EXEC SQL DEALLOCATE DESCRIPTOR mydesc END-EXEC.
Compatibility
DESCRIBE is specified in the SQL standard.
See Also