Try it here
Subscribe
Oracle PLSQL triggers

Triggers and their different functionalities

triggers_and_their_different_functionalities

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

  1. Statement Level Trigger.
  2. Row Level Trigger

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

Execution order of triggers

The execution order of statement and row level triggers(before and after) is as following

  1. Before Statement level Trigger
  2. Before Row level Trigger
  3. After Row level Trigger
  4. After Statement level Trigger

Writer profile pic

Uk01 on Nov 09, 2020 at 12:03 am


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.



Post Comment

Comments( 0)

×

Forgot Password

Please enter your email address below and we will send you information to change your password.