Oracle PL/SQL/System Tables Views/ALL TRIGGERS — различия между версиями

Материал из SQL эксперт
Перейти к: навигация, поиск
м (1 версия)
 
(нет различий)

Текущая версия на 10:01, 26 мая 2010

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");