NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
E-7
EXECUTE Statement
but are intended to be passed directly to users or stored in tables. There are cases in
which an SQL statement can return a different error than it did in a previous version of
SQL.
See the NonStop SQL/MP Messages Manual and the NonStop SQL/MP programming
manual for your host language for more information about handling errors and warnings
within programs.
See the NonStop SQL/MP Messages Manual for a complete list of SQL error and
warning messages, including those that are displayed by SQLCI or sent to programs as
well as those sent to the EMS subsystem.
EXECUTE Statement
EXECUTE is a dynamic SQL or SQLCI statement that executes an SQL statement
previously compiled by the PREPARE statement.
{ stmt-name }
{ :stmt-variable }
specifies the compiled statement to execute by the name assigned to it in the
PREPARE statement.
stmt-name is the name. Use this form to specify the name in SQLCI or in
programs.
:stmt-variable is a host variable of SQL type CHAR or VARCHAR that
contains the name. Use this form to specify the name only in programs.
EXECUTE { stmt-name }
{ :stmt-variable }
[ USING [?param=] value [, [?param=] value ]... ]
[ USING :variable [ , :variable ] ... ]
[ USING DESCRIPTOR :in-sqlda ]
[ RETURNING { :variable } ]
[ { USING DESCRIPTOR :out-sqlda } ]
value is:
{ literal }
{ CURRENT_TIMESTAMP }
{ COMPUTE_TIMESTAMP }