What is a trigger? How many types of triggers?

Started by mark.smith836, August 30, 2012, 07:27:02 AM

mark.smith836

Trigger is a database object that is executed or performed when insert, update and delete statement are given.

As per my view there are mainly three types of triggers
1)   Before trigger
2)   After trigger
3)   Instead of triggers
I would like to be enlightened if there are additional triggers besides the ones mentioned.
Spinx Inc. – A Well-known and an Ideal Company for Mobile Applications Development Service
http://mobile-development.spinxwebdesign.com/

ruby

It is a piece of SQL that is activated when a certain event happens or occurs. A common usage is when a new record is added to a database, this triggers an action - for example, you have certain records in a database table that are assigned to a particular customer and, upon that record being updated, that customer/admin should be notified of the change.

Triggers are useful to fire events and perform some action when data is inserted, updated, or deleted from a table.

Triggers are of 3 types in SQL Server 2005:

1. DML Triggers
- AFTER Triggers
- INSTEAD OF Triggers
2. DDL Triggers
3. CLR Triggers