Use this statement with ESQL/C.
>>-PREPARE--+-statement_id-----+--FROM--------------------------> '-statement_id_var-' >--+-' statement_text '-+-------------------------------------->< '-statement_var------'
Element | Description | Restrictions | Syntax |
---|---|---|---|
statement_id | Identifier declared here for the prepared object | Must be unique in the database among names of cursors and prepared objects | Identifier |
statement_id_var | Host variable storing statement_id | Must have been previously declared as a character data type | Language specific |
statement_text | Text of the SQL statement(s) to prepare | See Preparing Multiple SQL Statements and Statement Text. | Quoted String. |
statement_var | Host variable storing the text of one or more SQL statements | Must be a character data type. Not valid if the SQL statement(s) contains the Collection-Derived-Table segment. | Language specific |
The PREPARE statement enables your program to assemble the text of one or more SQL statements at runtime (creating a prepared object) and make it executable. This dynamic form of SQL is accomplished in three steps:
In Dynamic Server, the same collating order that is current when you create a prepared object is also used when that object is executed, even if the execution-time collation of the session (or of DB_LOCALE) is different.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]