|
|
PREPARE
Prepares an SQL statement contained in a host string variable for execution.
Usage
Description
The SQL statement contained in the host variable is prepared for execution. This function is equivalent to pre-processing and compiling an embedded SQL statement, but is performed at run-time. The (internal) output form of the statement is identified by the statement-name parameter.
See ALLOCATE CURSOR for a description of extended statements.
See also, DESCRIBE.
The following SQL statements can be used with the PREPARE statement:
Restrictions
Notes
The source form of the SQL statement to be prepared is not preceded by the identifier EXEC SQL or terminated by the language-specific delimiter.
The source statement may contain question marks as parameter markers to represent variables to be used when the prepared statement is executed. See the Mimer SQL Programmer's Manual, chapter 11, Dynamic SQL, for more details.
Example
... EXEC SQL BEGIN DECLARE SECTION; EXEC SQL CHARACTER(255); ... EXEC SQL END DECLARE SECTION; ... SQL_TXT := "CREATE INDEX pdt_product_search ON products(product_search);"; EXEC SQL PREPARE statement_name FROM :SQL_TXT; ...For more information, see the Mimer SQL Programmer's Manual, chapter 11, Preparing Statements.
Standard Compliance
Standard
Compliance
Comments
X/Open-95
SQL-92 YES Fully compliant.
|
Upright Database Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 dbtechnology@upright.se |
|
|