Skip to main content

Triggers, dependencies

sys.triggers
name type references description
"id" INTEGER   The internal trigger identifier.
"name" VARCHAR   Its SQL name.
"table_id" INTEGER sys.tables.id The corresponding triggering table identifier
"time" SMALLINT  

BEFORE/AFTER

"orientation" SMALLINT   FOR EACH ROW/FOR EACH STATEMENT
"event" SMALLINT   Update/insert/delete event.
"old_name" VARCHAR   The correlation SQL name for the previous state.
"new_name" VARCHAR   The correlation SQL name for the previous state.
"condition" VARCHAR   The SQL condition.
"statement" VARCHAR   A SQL statement to be executed.
sys.dependencies
name type references description
"id" INTEGER sys.*.id The identifier which has a dependency.
"depend_id" INTEGER sys.*.id The identifier reference on which it depends. The combination of "id" and "depend_id" is unique key.
"depend_type" SMALLINT   To which sys.<obj>.id it depends: a table or view, a column, a function, an auth, an object.
1=Schema, 2=Table, 3=Column, 4=Key, 5=View, 6=User, 7=Function, 8=Trigger, 9=Owner, 10=Index, 11=FKey, 12=Sequence, 13=Procedure