If trigger exists, drop trigger : user_triggers « System Tables Views « Oracle PL / SQL






If trigger exists, drop trigger

   

SQL>
SQL> BEGIN
  2    FOR i IN (SELECT null FROM user_triggers WHERE trigger_name = 'INSERTemp') LOOP
  3      EXECUTE IMMEDIATE 'DROP TRIGGER InsertBooksemp';
  4    END LOOP;
  5  END;
  6  /

PL/SQL procedure successfully completed.

SQL>

   
    
    
  








Related examples in the same category

1.Query user_triggers
2.Query user_triggers with trigger name
3.Restore trigger create statement from user_trigger table
4.Check the status of the trigger