The following restrictions apply to the statement that is contained in
the quoted string or in the statement variable:
- The statement cannot contain a host-language comment.
- Names of host-language variables are not recognized as such in prepared
text.
The only identifiers that you can use are names defined in the
database, such as table names and column names.
- The statement cannot reference a host-variable list or a descriptor; it
must not contain any question-mark ( ? ) placeholders, which are allowed with
a PREPARE statement.
- The text must not include any embedded SQL statement prefix, such
as the dollar sign ( $ ) or the keywords EXEC SQL.
Although it is
not required, the SQL statement terminator ( ; ) can be included in the
statement text.
- In Dynamic Server, a SELECT or INSERT statement specified within the EXECUTE
statement cannot contain a Collection-Derived Table clause.
EXECUTE IMMEDIATE
cannot process input host variables, which are required for a collection variable.
Use the EXECUTE statement or a cursor to process prepared accesses to collection
variables.