16.10. DESCRIBE INPUT
Synopsis
DESCRIBE INPUT statement_name
Description
Describes the input parameters for a prepared statement. It returns a table with the position and type of each parameter. If the type of the parameter can not be determined, unknown is returned. For more information on preparing a statement see PREPARE.
Examples
Describe query with 3 parameters:
Let
my_select
be the name of the prepared statementSELECT ? FROM nation WHERE regionkey = ? AND name < ?
:DESCRIBE INPUT my_select
Returns a table with the positions and types of all parameters
Position | Type ----------------- 0 | unknown 1 | bigint 2 | varchar
Describe query with no parameters:
Let
my_select
be the name of the prepared statementSELECT * FROM nation
:DESCRIBE INPUT my_select2
Returns a table with one null row
Position | Type --------------- NULL | NULL