Prepares an SQL statement contained in a host string variable for execution.
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:
ALTER ENTER SET DATABANK CALL GRANT SET DATABASE COMMENT INSERT SET SESSION COMMIT LEAVE SET SHADOW CREATE REVOKE SET TRANSACTION DELETE ROLLBACK START DELETE CURRENT SELECT UPDATE DROP SET UPDATE CURRENT
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.
YES Fully compliant.
Upright Database Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40