Trigger is same as stored procedure & it is automatically invoked whenever DML operation performed against table or view.
There are two types of triggers supported by PL/SQL
Statement Level Trigger: In statement level trigger, trigger body is executed only once for DML statement.
Row Level Trigger: In row level trigger, trigger body is executed for each row DML statements. It is the reason, we are employing each row clause and internally stored DML transaction in trigger specification, these qualifiers :old, :new, are also called as records type variables.
These qualifiers are used in trigger specification & trigger body.
Syntax: :old.column_name :new.column_name
The execution order of statement and row level triggers(before and after) is as following
If you like dEexams.com and would like to contribute, you can write your article here or mail your article to admin@deexams.com . See your article appearing on the dEexams.com main page and help others to learn.