SQL-J Language Reference
Page 53 of 121

SET TRIGGERS statement

SET TRIGGERS allows you to disable and to re-enable a specified trigger or triggers, all triggers for a specified table, or all triggers in the database. (Re-enabling a trigger does not cause it to fire on any changes that were made while it was disabled.)

Syntax

SET TRIGGERS
{
    ALL |
     TriggerName [, TriggerName ] * } |
    FOR TableName
}
{ ENABLED | DISABLED }

ALL disables or re-enables all triggers in the database that exist at the time the SET TRIGGERS statement is executed should be disabled or re-enabled. FOR TableName disables or re-enables all triggers on the table that exist at the time the statement is executed.

Disabling or re-enabling a trigger is persistent and affects all connections.

Example

SET TRIGGERS FOR Hotels DISABLED