|
|
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-nameparameter.See ALLOCATE CURSOR for a description of extended statements.
See also, DESCRIBE.
The following SQL statements can be used with the
PREPAREstatement:Notes
The source form of the SQL statement to be prepared is not preceded by the identifier
EXEC SQLor 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, Dynamic SQL, for more details.
Example
... EXEC SQL BEGIN DECLARE SECTION; CHARACTER SQL_TXT(255); ... EXEC SQL END DECLARE SECTION; ... SQL_TXT := "DELETE FROM products WHERE product_search LIKE ?"; EXEC SQL PREPARE statement1 FROM :SQL_TXT; ...For more information, see the Mimer SQL Programmer's Manual, Preparing Statements.
Standard Compliance
|
Mimer Information Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 info@mimer.se |
|
|