me,myself,english and programming..

Drop all triggers in Oracle

If you need to drop all the triggers in oracle for a split second, here how you can do it. Below is the sample how to drop all triggers in myTesting schema with trigger name like ‘%_BI’

begin
for i in (select trigger_name,owner from dba_triggers where  trigger_name like '%_BI%' and owner = 'myTesting' ) LOOP
execute immediate 'DROP TRIGGER '||i.owner||'.'||i.trigger_name;
END LOOP;
END;
Make sure you know what you are doing.
Till then..
Happy coding...

Post a Comment