Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements > CREATE TRIGGER >

Triggers and SPL Routines

You cannot define a trigger in an SPL routine that is called inside a DML (data manipulation language) statement, as listed in Data Manipulation Language Statements. Thus, the following statement returns an error if the sp_items procedure includes the CREATE TRIGGER statement:

INSERT INTO items EXECUTE PROCEDURE sp_items

SPL variables are not valid in CREATE TRIGGER statements. An SPL routine called by a trigger cannot perform INSERT, DELETE, or UPDATE operations on any table or view that is not local to the current database. See also Rules for SPL Routines for additional restrictions on SPL routines that are invoked in triggered actions.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]