Enabling Triggers and Disabling triggers:
By default, all triggers are automatically enabled when they are created. Moreover, they can be disabled. Once a task is finished, the trigger can be re-enabled. An Enabling and disabling triggers are performed using enable and disable keywords.
Syntax:
ALTER TRIGGER <triggername> ENABLE|DISABLE;
Example:
ALTER TRIGGER empdel DISABLE;
For an exacting table, all triggers can be enabled using a single command. ALTER TABLE <tablename> DISABLE ALL TRIGGERS;
Dropping triggers:
Triggers are dropped using the Drop Trigger Command. The syntax is as given below:
Syntax:
DROP TRIGGER <triggername>;
Example:
DROP TRIGGER chkprod;
Restrictions on Triggers:
Even-though there are several benefits in which a trigger can provide there are still some restrictions in using Triggers.
Trigger body cannot contain COMMIT or ROLLBACK statements. A Trigger body must hold keyword DECLARE for declarative section unlike Subprograms. Trigger specification must not hold any IS/AS keywords.