How many types of triggers exist in PL/SQL?

There are 12 types of triggers in PL/SQL that contains the combination of BEFORE, AFTER, ROW, TABLE, INSERT, UPDATE, DELETE and ALL keywords.

  • BEFORE ALL ROW INSERT
  • AFTER ALL ROW INSERT
  • BEFORE INSERT
  • AFTER INSERT etc.

In PL/SQL, there are two main types of triggers:

  1. Row-level triggers: These triggers are fired once for each row affected by the triggering statement. They are further classified into BEFORE ROW triggers (executed before the triggering statement) and AFTER ROW triggers (executed after the triggering statement).
  2. Statement-level triggers: These triggers are fired once for each triggering statement, regardless of the number of rows affected. They include BEFORE STATEMENT triggers (executed before the triggering statement) and AFTER STATEMENT triggers (executed after the triggering statement).

So, the correct answer is two: row-level triggers and statement-level triggers.