--视图的信息都存储在数据字典视图user_trigger里面: desc user_triggers; Name Type Nullable Default Comments ----------------- -------------- -------- ------- --------------------------------------------------------------------------- TRIGGER_NAME VARCHAR2(30) Y Name of the trigger TRIGGER_TYPE VARCHAR2(16) Y Type of the trigger (when it fires) - BEFORE/AFTER and STATEMENT/ROW TRIGGERING_EVENT VARCHAR2(227) Y Statement that will fire the trigger - INSERT, UPDATE and/or DELETE TABLE_OWNER VARCHAR2(30) Y Owner of the table that this trigger is associated with BASE_OBJECT_TYPE VARCHAR2(16) Y TABLE_NAME VARCHAR2(30) Y Name of the table that this trigger is associated with COLUMN_NAME VARCHAR2(4000) Y The name of the column on which the trigger is defined over REFERENCING_NAMES VARCHAR2(128) Y Names used for referencing to OLD, NEW and PARENT values within the trigger WHEN_CLAUSE VARCHAR2(4000) Y WHEN clause must evaluate to true in order for triggering body to execute STATUS VARCHAR2(8) Y If DISABLED then trigger will not fire DESCRIPTION VARCHAR2(4000) Y Trigger description, useful for re-creating trigger creation statement ACTION_TYPE VARCHAR2(11) Y TRIGGER_BODY LONG Y Action taken by this trigger when it fires -- select table_owner,table_name,column_name,trigger_name,triggering_event from user_triggers;其他数据库对象的定义代码,可以从user_source视图里面找到: oracle 定义对象的代码可以从user_source数据字典中找到
select * From user_triggers
select distinct table_name from user_triggers where table_owner=upper('用户名');
--视图的信息都存储在数据字典视图user_trigger里面:
desc user_triggers;
Name Type Nullable Default Comments
----------------- -------------- -------- ------- ---------------------------------------------------------------------------
TRIGGER_NAME VARCHAR2(30) Y Name of the trigger
TRIGGER_TYPE VARCHAR2(16) Y Type of the trigger (when it fires) - BEFORE/AFTER and STATEMENT/ROW
TRIGGERING_EVENT VARCHAR2(227) Y Statement that will fire the trigger - INSERT, UPDATE and/or DELETE
TABLE_OWNER VARCHAR2(30) Y Owner of the table that this trigger is associated with
BASE_OBJECT_TYPE VARCHAR2(16) Y
TABLE_NAME VARCHAR2(30) Y Name of the table that this trigger is associated with
COLUMN_NAME VARCHAR2(4000) Y The name of the column on which the trigger is defined over
REFERENCING_NAMES VARCHAR2(128) Y Names used for referencing to OLD, NEW and PARENT values within the trigger
WHEN_CLAUSE VARCHAR2(4000) Y WHEN clause must evaluate to true in order for triggering body to execute
STATUS VARCHAR2(8) Y If DISABLED then trigger will not fire
DESCRIPTION VARCHAR2(4000) Y Trigger description, useful for re-creating trigger creation statement
ACTION_TYPE VARCHAR2(11) Y
TRIGGER_BODY LONG Y Action taken by this trigger when it fires
--
select table_owner,table_name,column_name,trigger_name,triggering_event
from user_triggers;其他数据库对象的定义代码,可以从user_source视图里面找到:
oracle 定义对象的代码可以从user_source数据字典中找到
from user_triggers where table_owner=upper('用户名');