SQL/MX Programming Manual for C and COBOL (G06.24+, H06.03+)

Embedded SQL Statements
HP NonStop SQL/MX Programming Manual for C and COBOL523627-004
2-7
Embedded SQL Declarations and Statements
Table 2-3. Nonexecutable SQL Statements
Statement Description
Catalog and Schema Declarations
DECLARE CATALOG* Sets default catalog for unqualified schema
names in static SQL statements within a
compilation unit.
DECLARE SCHEMA* Sets default schema for unqualified object
names in static SQL statements within a
compilation unit.
NAMETYPE and MPLOC Attribute Declarations
DECLARE NAMETYPE* Sets default NAMETYPE attribute value to
ANSI or NSK for static statements within a
compilation unit.
DECLARE MPLOC* Sets default Guardian volume and
subvolume for unqualified physical object
names in static SQL statements within a
compilation unit.
Cursor Declaration
DECLARE CURSOR Specifies a static cursor in a host program
and associates the name of the cursor with a
query expression that specifies the rows to
be retrieved by using the cursor.
Exception Declaration
WHENEVER Generates code that checks SQL statement
execution for errors and an ending no-rows-
found condition and specifies an action to
take.
Data Control Language (DCL) Statements
CONTROL QUERY DEFAULT* Overwrites the contents in memory for the
current process. This statement applies to
static SQL.
CONTROL QUERY SHAPE* Forces execution plans by modifying the
operator tree for a prepared statement. This
statement applies to static SQL.
CONTROL TABLE* Specifies a performance-related option for
DML accesses to a table or view. The
options are MDAM, PRIORITY,
TABLELOCK, TIMEOUT, and RESET. This
statement applies to static SQL.
* Indicates the statement is an SQL/MX extension.