
Dynamic SQL Operations
HP NonStop SQL/MP Programming Manual for C—429847-008
10-2
Dynamic SQL Statements
Dynamic SQL Statements
You can perform most of the same operations using dynamic SQL statements that you
can perform with static SQL statements, including DDL, DML, and DCL statements and
SQL cursors.
Table 10-1
summarizes the dynamic SQL statements that you can use in
a C program.
These statements are described following. For the syntax of each statement, see the
SQL/MP Reference Manual
.
Table 10-1. Dynamic SQL Statements
Statement
Description
DESCRIBE INPUT
Returns information about input parameters associated with a
prepared SQL statement.
DESCRIBE
Returns information about output variables (usually SELECT
columns) associated with a prepared SQL statement.
PREPARE
Dynamically compiles an SQL statement stored in a host
variable and associates the prepared statement with a
statement name (an SQL identifier) or a host-variable name.
EXECUTE
Runs a prepared SQL statement.
EXECUTE IMMEDIATE
Compiles and runs an SQL statement stored in a host
variable.
DECLARE CURSOR
Defines an SQL cursor and associates the cursor with a
SELECT statement.
OPEN
Opens an SQL cursor: Runs the associated SELECT
statement and positions the cursor before the first row
specified by the SELECT statement so that subsequent
FETCH statements can retrieve data. Optional USING clause
provides values for dynamic parameters.
FETCH
Positions an SQL cursor at the next row of the result table
defined by the associated SELECT statement and then
retrieves data into host variables.
RELEASE
Deallocates space in the host-language program for a
dynamic SQL statement prepared from a host variable.
CLOSE
Closes an SQL cursor and frees the result table defined by
the associated SELECT statement.
Содержание NonStop SQL/MP
Страница 4: ......
Страница 14: ...Contents HP NonStop SQL MP Programming Manual for C 429847 008 x ...
Страница 34: ...Introduction HP NonStop SQL MP Programming Manual for C 429847 008 1 8 SQL MP Version Management ...
Страница 60: ...Host Variables HP NonStop SQL MP Programming Manual for C 429847 008 2 26 VARCHAR Data Type ...
Страница 68: ...SQL MP Statements and Directives HP NonStop SQL MP Programming Manual for C 429847 008 3 8 Finding Information ...
Страница 156: ...Explicit Program Compilation HP NonStop SQL MP Programming Manual for C 429847 008 6 40 SQL Program Files ...
Страница 264: ...Dynamic SQL Operations HP NonStop SQL MP Programming Manual for C 429847 008 10 66 Detailed Dynamic SQL Program ...
Страница 294: ...SQL MP Sample Database HP NonStop SQL MP Programming Manual for C 429847 008 A 6 ...
Страница 300: ...Memory Considerations HP NonStop SQL MP Programming Manual for C 429847 008 B 6 Avoiding Memory Stack Overflows ...
Страница 304: ...Maximizing Local Autonomy HP NonStop SQL MP Programming Manual for C 429847 008 C 4 Skipping Unavailable Partitions ...