DB2 Version 10.1 for Linux, UNIX, and Windows

Expanded support for triggers

A trigger defines a set of actions that are performed in response to an event like an insert, update, or delete operation on a table. Starting in V10.1 the CREATE TRIGGER statement allows more flexibility and functionality when creating triggers.

Multiple-event trigger support
The trigger event clause in the CREATE TRIGGER statement can now contain more than one operation. The ability to use UPDATE, DELETE, and INSERT operations together in a single clause means that the trigger is activated by the occurrence of any of the specified events. One, two, or all three trigger events can be arbitrarily specified in a CREATE TRIGGER statement. However, a trigger event cannot be specified more than once.
Trigger event predicates identify trigger events
The trigger event predicates of UPDATING, INSERTING, and DELETING can be used to identify the event that activated a trigger. Trigger event predicates can only be used in the trigger action of a CREATE TRIGGER statement that uses a compound SQL (compiled) statement.
FOR EACH STATEMENT restriction removed
The FOR EACH STATEMENT option is now supported in the CREATE TRIGGER statement for PL/SQL triggers. You can create triggers that fire only one time per statement irrespective of the number of rows affected.