Use the DESCRIBE statement to initialize the descriptor structure, and to determine the parameter and table column information needed for a dynamic SQL statement with descriptor.
You have used the PREPARE statement to prepare the SQL statement for execution.
EXEC
SQL [<session_spec>] DESCRIBE <statement_name>
[INTO <descriptor_name> [<using_clause>]];
· Specify <session_spec>, when you are working with multiple database sessions.
· If the INTO clause is not specified, the precompiler uses the standard descriptor sqlda.
· If you do not want to use the standard descriptor, you can declare the descriptor <descriptor_name> as a variable of the type sqldatype or struct sqlda (in SQL mode ORACLE, SQLDA only). However, the descriptor must always have the same type within a program.
In the SQL mode INTERNAL, the <using_clause> has no meaning in the DESCRIBE statement. It is used for DB2 compatibility.