SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
D-43
Example—DESCRIBE INPUT
IND_PTR field of each SQLVAR entry contains the address of the corresponding 
indicator parameter entry.
Example—DESCRIBE INPUT
This C statement returns descriptions of input variables in the prepared statement 
identified by :stmt_name to an SQLDA structure pointed to by :*input_sqlda_ptr.
EXEC SQL DESCRIBE INPUT :stmt_name INTO :*input_sqlda_ptr
 NAMES INTO :*input_namesbuf_ptr;
The NAMES INTO clause directs DESCRIBE INTO to return the names of the 
input variables to the buffer pointed to by :*input_namesbuf_ptr and to set the 
var_ptr field of each entry in the SQLDA to the address of the corresponding name.
For examples of related statements and a detailed discussion of dynamic SQL 
programming techniques, see the SQL/MP Programming Manual for C or the 
SQL/MP Programming Manual for COBOL.
DESCRIBE Statement
DESCRIBE is a dynamic SQL statement that returns descriptions of output variables 
(usually SELECT columns) from a previously prepared statement.
stmt-name
is the SQL identifier of the prepared SQL statement.
:stmt-variable
is the name of a host variable that stores the SQL identifier of the prepared SQL 
statement.
INTO :sqlda
specifies the host variable name of an SQLDA declared in an INCLUDE SQLDA 
statement into which DESCRIBE returns:
DESCRIBE { stmt-name } INTO :sqlda
 { :stmt-variable }
 [ NAMES INTO :names-buffer ]
 [ COLLATIONS INTO :collations-buffer ]
For a 
SELECT
The number of SELECT columns and a description of each 
column
For an 
INSERT
The data type, length, and scale for the system-defined primary 
key (SYSKEY) of the last record inserted










