NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
D-40
DESCRIBE INPUT Statement
consistency but reduces concurrency), so it would be best to execute it at a time
when only a few users need concurrent access to the database.
DELETE FROM INVENT.PARTSUPP
WHERE PARTNUM BETWEEN 6400 AND 6700
AND PARTCOST > 1600.00 REPEATABLE ACCESS;
The following DELETE removes all suppliers not in Texas from the table
PARTSUPP:
DELETE FROM INVENT.PARTSUPP
WHERE SUPPNUM IN (SELECT SUPPNUM FROM INVENT.SUPPLIER
WHERE STATE <> "TEXAS");
You can achieve the same result with the following DELETE, as long as SUPPNUM
does not contain NULL characters:
DELETE FROM INVENT.PARTSUPP
WHERE SUPPNUM NOT IN (SELECT SUPPNUM FROM INVENT.SUPPLIER
WHERE STATE = "TEXAS");
DESCRIBE INPUT Statement
DESCRIBE INPUT is a dynamic SQL statement that returns descriptions of input
parameters for a previously prepared statement. (An input parameter is a placeholder for
a literal value to be supplied when the statement executes.)
stmt-name
is the SQL identifier of the prepared SQL statement, optionally qualified with the
name of the program.
: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 the number of input parameters and a
description of each parameter. (For more information about the contents and use of
an SQLDA, see the NonStop SQL/MP programming manual for your host
language.)
DESCRIBE INPUT { stmt-name } INTO :sqlda
{ :stmt-variable }
[ NAMES INTO :names-buffer ]