ALLBASE/SQL Reference Manual (36216-90216)

384 Chapter10
SQL Statements A - D
DESCRIBE
DESCRIBE
The DESCRIBE statement is used in an application program to pass information about a
dynamic statement between the application and ALLBASE/SQL. It must refer to a
statement preprocessed with the PREPARE statement.
Scope
C and Pascal Applications Only
SQL Syntax
DESCRIBE [OUTPUT
INPUT
RESULT]
StatementName
{INTO [[SQL] DESCRIPTOR]
USING [SQL] DESCRIPTOR} {SQLDA
AreaName
}
Parameters
OUTPUT specifies that the characteristics of any output values in the prepared
StatementName
be described in the associated sqlda_type and
sqlformat_type data structures. This applies to query result column
definitions in a SELECT statement or to dynamic return status or output
parameters specified as question marks in an EXECUTE PROCEDURE
statement.
OUTPUT is the default.
INPUT specifies that the characteristics of any dynamic input parameters in the
prepared
StatementName
be described in the associated sqlda_type and
sqlformat_type data structures. This applies to dynamic input parameters
specified as question marks in any DML statement.
RESULT specifies that the characteristics of any single format multiple row result
sets in a procedure created using the WITH RESULT clause be described
in the associated sqlda_type and sqlformat_type data structures. This
applies to any prepared EXECUTE PROCEDURE statement.
StatementName
identifies a previously preprocessed (prepared) ALLBASE/SQL
statement.
INTO specifies the sqlda_type data structure where data is to be described.
USING specifies the sqlda_type data structure where data is to be described.
SQLDA specifies that a data structure of sqlda_type named sqlda is to be used to
pass information about the prepared statement between the application
and ALLBASE/SQL.
AreaName
specifies the user defined name of a data structure of sqlda_type that is to
be used to pass information about the prepared statement between the
application and ALLBASE/SQL.