Oracle: view triggers on a table
September 13, 2008 20:23:18 Last update: September 13, 2008 20:41:05
Oracle provides three views to view triggers on tables:
These are the columns:
-
USER_TRIGGERSdescribes the triggers owned by the current user. This view does not display the OWNER column. -
ALL_TRIGGERSdescribes the triggers on tables accessible to the current user. -
DBA_TRIGGERSdescribes all triggers in the database.
These are the columns:
| Column Name | Description |
|---|---|
| OWNER | Owner of the trigger |
| TRIGGER_NAME | Name of the trigger |
| TRIGGER_TYPE | When the trigger fires: BEFORE/AFTER and STATEMENT/ROW, INSTEAD OF, COMPOUND |
| TRIGGERING_EVENT | DML, DDL, or database event that fires the trigger |
| TABLE_OWNER | Owner of the table on which the trigger is defined |
| BASE_OBJECT_TYPE | Base object on which the trigger is defined: TABLE, VIEW, SCHEMA, DATABASE |
| TABLE_NAME | Name of the table that this trigger is associated with, NULL if BASE_OBJECT_TYPE is SCHEMA or DATABASE |
| COLUMN_NAME | Name of the nested table column (if a nested table trigger), else NULL |
| REFERENCING_NAMES | Names used for referencing OLD and NEW column values from within the trigger |
| WHEN_CLAUSE | Must evaluate to TRUE for TRIGGER_BODY to execute |
| STATUS | ENABLED or DISABLED, trigger will not fire if DISABLED |
| DESCRIPTION | Trigger description |
| ACTION_TYPE | Action type of the trigger body: CALL or PL/SQL |
| TRIGGER_BODY | Statements executed by the trigger when it fires |