If you call the SPL routine in a SQL statement that is not a data-manipulation language (DML) statement (namely EXECUTE FUNCTION or EXECUTE PROCEDURE), the SPL routine can execute any statement that is not listed in the section SQL Statements Not Valid in an SPL Statement Block.
In Dynamic Server, if you call the SPL routine as part of a DML statement (namely, an INSERT, UPDATE, DELETE, or SELECT statement), then the routine cannot execute any SQL statement in the following list:
ALTER ACCESS_METHOD
|
CREATE AGGREGATE
CREATE DISTINCT TYPE CREATE OPAQUE TYPE CREATE OPCLASS CREATE ROLE CREATE ROW TYPE CREATE SEQUENCE CREATE TRIGGER DELETE |
DROP ACCESS_METHOD
|
DROP TRIGGER
|
In Extended Parallel Server, if you call the SPL routine as part of a DML statement (namely, an INSERT, UPDATE, DELETE, MERGE, or SELECT statement), then the routine can execute only the following statements of SQL:
SELECT
|
SET EXPLAIN
|
For both Dynamic Server and Extended Parallel Server, these restrictions do not apply to an SPL routine that is invoked by a trigger, because in this case the SPL routine is not called by the DML statement, and therefore can include any SQL statement, such as UPDATE, INSERT and DELETE, that is not listed among the SQL Statements Not Valid in an SPL Statement Block.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]