Read trigger name and Query all_Triggers table : ALL_TRIGGERS « System Tables Views « Oracle PL / SQL






Read trigger name and Query all_Triggers table

 

   SET TERMOUT off
   SET FEEDBACK off
   COLUMN when_clause FORMAT a60 WORD_WRAPPED

   
SELECT 'CREATE OR REPLACE TRIGGER ' || description
   FROM ALL_TRIGGERS
   WHERE trigger_name = UPPER('&trigger_name')
   AND owner = UPPER('&trigger_owner');
   
SELECT 'WHEN (' || when_clause || ')'  when_clause
   FROM ALL_TRIGGERS
   WHERE trigger_name = UPPER('&trigger_name')
   AND owner = UPPER('&trigger_owner')
   AND when_clause IS NOT NULL;
   
SELECT trigger_body
   FROM ALL_TRIGGERS
   WHERE trigger_name = UPPER('&trigger_name')
   AND owner = UPPER('&trigger_owner');

 








Related examples in the same category