When and why do we use triggers

Last Reply on Dec 30, 2011 06:50 AM By Vinz

Posted on Dec 28, 2011 10:26 PM

Hi,

 

I need to know how will a trigger help me?

Posted on Dec 28, 2011 10:28 PM

Triggers are mainly used for automation. On a table you can create insert, update and delete triggers.

Insert trigger will execute a query when a row is inserted in table

Update trigger will execute a query when a row is updated in table

Delete trigger will execute a query when a row is deleted in table

http://searchsqlserver.techtarget.com/feature/Why-use-triggers-in-Microsoft-SQL-Server