You can use the DROP TRIGGER statement to drop a trigger from the database. This topic describes how to drop a trigger.
Prerequisites
To drop a trigger in your schema, you must be the owner of the trigger or have the
DROP ANY TRIGGERsystem privilege.To drop a trigger in other schemas, you must have the
ADMINISTER DATABASE TRIGGERsystem privilege.
Syntax
DROP TRIGGER [ schema. ] trigger;
Parameters
| Parameter | Description |
|---|---|
| Schema | The name of the schema where the trigger is located. The default value is your schema. |
| Trigger | The name of the trigger to be dropped. |
Examples
View the
del_new_regiontrigger.obclient> SELECT TRIGGER_BODY FROM USER_TRIGGERS WHERE TRIGGER_NAME='DEL_NEW_REGION'\G *************************** 1. row *************************** TRIGGER_BODY: TRIGGER del_new_region BEFORE DELETE ON regions FOR EACH ROW WHEN (old.region_id >3) BEGIN INSERT INTO reg_his(region_id , region_name ) VALUES( :old.region_id, :old.region_name ); END 1 row in setDrop the
del_new_regiontrigger.obclient> DROP TRIGGER del_new_region; Query OK, 0 rows affectedView the
del_new_regiontrigger again.obclient> SELECT * FROM information_schema.triggers WHERE TRIGGER_NAME= 'DEL_NEW_REGION'\G ORA-00942: table or view 'INFORMATION_SCHEMA.TRIGGERS' does not exist