2 Day Developer > Using Triggers > Managing Triggers in the Da... > Modifying Triggers
Modifying Triggers |
Previous |
Next |
Similar to a stored procedure, a trigger cannot be explicitly altered. It must be replaced with a new definition. The ALTER
TRIGGER
statement is used only to recompile, enable, or disable a trigger.
When replacing a trigger, you must include the OR
REPLACE
option in the CREATE
TRIGGER
statement. The OR
REPLACE
option is provided to allow a new version of an existing trigger to replace the older version, without affecting any grants made for the original version of the trigger.
Alternatively, the trigger can be dropped using the DROP
TRIGGER
statement, and you can rerun the CREATE
TRIGGER
statement.
To drop a trigger, the trigger must be in your schema, or you must have the DROP
ANY
TRIGGER
system privilege.