2 Day Developer > Using Triggers > Managing Triggers in the Da... > Dropping Triggers
Dropping Triggers |
Previous |
Next |
When you no longer need a trigger, you can drop the trigger with Object Browser or with the SQL DROP
command. After dropping a trigger, you can drop any dependent objects that are no longer needed.
You can disable, rather than drop, a trigger if you temporarily want to stop it from firing. See Disabling Triggers.
Example: Dropping Triggers shows how to drop triggers and tables used by the triggers.
Dropping Triggers
-- first, drop the audit_sal trigger DROP TRIGGER audit_sal; -- then drop the table used by the trigger DROP TABLE emp_audit; -- drop the log_salary_increase trigger, then the table used by the trigger DROP TRIGGER log_salary_increase; DROP TABLE emp_sal_log; -- drop the emp_log_update trigger, then the table used by the trigger DROP TRIGGER emp_log_update; DROP TABLE emp_except_log; -- drop on_hr_logoff and on_hr_logon triggers, then drop hr_log_table DROP TRIGGER on_hr_logon; DROP TRIGGER on_hr_logoff; DROP TABLE hr_log_table;