If a trigger has been created with a WHEN clause, and the trigger event takes
place, the triggeredSQLStatement
will be executed only if the booleanExpression in the WHEN clause
evaluates to TRUE. If it evaluates to FALSE or NULL, the
triggeredSQLStatement will not be executed.
The transition tables or transition variables defined in the REFERENCING
clause can be referenced from the WHEN clause.
The restrictions listed for the triggeredSQLStatement in the
CREATE TRIGGER statement also apply to
the WHEN clause.
The use of a WHEN clause in a CREATE TRIGGER statement is valid only after
a database has been fully upgraded to
Release 10.11 or
higher. (See "Upgrading a database" in the
for more information.) This
clause has no meaning in a database that is at Release 10.10 or lower.