What is a Trigger

A trigger is a special kind of a store procedure that executes in response to certain action on the table like insertion, deletion or updation of data.

Basically, triggers are classified into two main types:
1. After Triggers (For Triggers)
2. Instead 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:

AFTER INSERT Trigger : This trigger is fired after an INSERT on the table.
AFTER UPDATE Trigger : This trigger is fired after an update on the table.
AFTER DELETE Trigger : This trigger is fired after a delete on the table.


2. Instead Of Triggers
INSTEAD OF TRIGGERS can be classified further into three types as:

INSTEAD OF INSERT Trigger.
INSTEAD OF UPDATE Trigger.
INSTEAD OF DELETE Trigger.

We can categorize the triggers in SQL Server in mainly three types:
Data Definition Language (DDL) Triggers.
Data Manipulation Language (DML) Triggers.
Logon Triggers.