Hi
What are Triggers. How many Triggers you can have on a table. How to invoke a Trigger on demand ?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
SenthilkumarPosted May 10, 2012, 3:15 AM
I suggest you to go through these tutorials.
http://www.go4expert.com/forums/showthread.php?t=15510
http://www.sqlteam.com/article/an-introduction-to-triggers-part-i
MuthuMari MPosted May 10, 2012, 1:26 AM
A trigger is a special kind of stored procedure that is invoked whenever an attempt is made to modify the data in the table it protects. Modifications to the table are made ussing INSERT,UPDATE,OR DELETE statements.
Triggers are used to enforce data integrity and business rules such as automatically updating summary data. It allows to perform cascading delete or update operations. If constraints exist on the trigger table,they are checked prior to the trigger execution. If constraints are violated statement will not be executed and trigger will not run.Triggers are associated with tables and they are automatic . Triggers are automatically invoked by SQL SERVER. Triggers prevent incorrect , unauthorized,or inconsistent changes to data.
pls refer this url
http://www.c-sharpcorner.com/uploadfile/shashikantray/create-delete-and-update-triggers-in-a-database/
thanks.
If this post is useful then mark it as "Accepted Answer"
Mukesh KumarPosted May 10, 2012, 1:12 AM
Please refer these links
http://msdn.microsoft.com/en-us/library/ms189799.aspx
http://www.codeproject.com/Articles/7304/Brief-about-Triggers-in-SQL-Server-2000
Jignesh TrivediPosted May 9, 2012, 11:52 PM
A trigger is a database object that is attached to a table. In many aspects it is similar to a stored procedure.
In other word special kind of stored procedure that run automatically on table when DML is fire
Trigger is Data base object so it limited by number of objects in a database.
Trigger is fired automatically when DML(insert /update or delete fire on table).
we can not invoke it on demand.
hope this help.
Satyapriya NayakPosted May 9, 2012, 10:47 PM
Triggers are special kind of stored procedures that get executed automatically when an INSERT, UPDATE or DELETE operation takes place on a table.
Triggers can't be invoked on demand. They get triggered when the associated INSERT, DELETE or UPDATE is performed.
Please refer the below links
http://www.c-sharpcorner.com/uploadfile/shashikantray/create-delete-and-update-triggers-in-a-database/default.aspx
http://www.codeproject.com/Articles/25600/Triggers-Sql-Server
Thanks
Thanks