PREPARE is an executable command that can only be embedded in a host language. PREPARE cannot be dynamically prepared.
Users must have authorization to execute the command in the PREPARE statement.
Bold text indicates clauses or options that are supported only syntactically.
PREPARE statement-name [INTO descriptor-name [USING {NAMES | LABELS | ANY | BOTH}]] {[ATTRIBUTES attr-host-variable] FROM host-variable | FROM string-expression}
attr-host-variable
{{ASENSITIVE | INSENSITIVE | SENSITIVE [DYNAMIC | STATIC]} |
{SCROLL | NOSCROLL} |
holdability |
returnability |
rowset-positioning |
fetch-first-clause |
{read-only-clause | update-clause} |
optimize-clause |
isolation-clause |
{FOR MULTIPLE ROWS | FOR SINGLE ROW} |
{ATOMIC | NOT ATOMIC CONTINUE ON SQLEXCEPTION} [...] }
holdability
[WITH HOLD | WITHOUT HOLD]
returnability
[WITH RETURN [TO CALLER] | WITHOUT RETURN]
rowset-positioning
[WITH ROWSET POSITIONING | WITHOUT ROWSET POSITIONING]
statement-name | Names the prepared statement. If a prepared statement by that name already exists, then that prepared statement is destroyed and replaced by the newer version specified in this PREPARE statement. |