2 Day Developer > Using Triggers > Managing Triggers in the Da... > Enabling Triggers
Enabling Triggers |
Previous |
Next |
By default, a trigger is automatically enabled when it is created. However, it can be disabled if necessary. After you complete the task that requires the trigger to be disabled, reenable the trigger so that it fires when appropriate.
To enable a disabled trigger, use the ALTER
TRIGGER
statement with the ENABLE
option as shown in Example: Enabling a Specific Trigger.
All triggers defined for a specific table can be enabled with one statement using the ALTER
TABLE
statement with the ENABLE
clause with the ALL
TRIGGERS
option. Example: Enabling All Triggers for a Table shows how to enable all triggers defined for the departments
table.