How many types of triggers are there?

There are two types of triggers. 

  1. After Triggers:

  • These triggers run after an insert, update or delete on a table. They are not supported for views. 
  • After Triggers can be classified further into three types as
  1. AFTER INSERT Trigger. 
  2. AFTER UPDATE Trigger. 
  3. AFTER DELETE Trigger. 

 

  1. Instead of Triggers:

  • These can be used as an interceptor for anything that anyone tried to do on our table or view. 
  • If you define an Instead of Trigger on a table for the Delete operation, then try to delete rows, 2 and they will not actually get deleted (unless you issue another delete instruction from within the trigger)
  • Instead of Triggers can be classified further into three types as
  1. INSTEAD OF INSERT Trigger. 
  2. INSTEAD OF UPDATE Trigger. 
  3. INSTEAD OF DELETE Trigger.