A trigger is a special type of stored procedure that is not called directly, instead it is executed when a specified event occurs.A DML trigger is specific to a single relation (table or view) and one phase in the timing of the event (BEFORE or AFTER).A DML trigger can be specified to execute for one specific event (insert, update, delete) or for a combination of those events.
Two other forms of trigger exist:
-
a “database trigger” can be specified to fire at the start or end of a user session (connection) or a user transaction.
-
a “DDL trigger” can be specified to fire before or after execution of one or more types of DDL statements.