Thanks In Advance Dudes
Use of Triggers ?
Wt was d use of BEFORE & AFTER triggers ? And diff too...
Thanks In Advance Dudes
Thanks In Advance Dudes
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.
Jignesh TrivediPosted Nov 1, 2012, 11:54 PM
SQL Server has two type trigger After trigger and Instead Of Triggers(not Before Trigger).
Name of trigger suggest itself their functionality. After trigger run after an insert, update or delete on a table. They are not supported for views.
INSTEAD-OF triggers are very powerful objects in SQL Server. They allow the developer to divert the database engine to do something different than what the user is trying to do. An example of this would be to add an INSTEAD-OF trigger to any table in your database that rolls back transactions on tables that you do not want modified. You must be careful when using this method because the INSTEAD-OF trigger will need to be disabled before any specified modifications can occur to this table.
hope this will help you.
suren vPosted Nov 2, 2012, 9:24 AM
Sandeep Singh ShekhawatPosted Nov 1, 2012, 11:07 PM
1. DDL Trigger
2.Login Trigger
3. DML Trigger
i. AFTER Trigger
a. INSERT
b. DELETE
c. UPDATE
ii. INSTEAD OF Trigger
a. INSERT
b. DELETE
c. UPDATE
Now AFTER triggers are uses on table. which fire according to action or Data manuplation on table and perform operation.
INSTEAD OF triggers are uses to on view which uses to INSERT/UPDATE/DELETE in tables using View that view contains more than one table.
suren vPosted Nov 1, 2012, 11:41 AM
Satyapriya NayakPosted Nov 1, 2012, 10:21 AM
http://www.c-sharpcorner.com/uploadfile/shashikantray/create-delete-and-update-triggers-in-a-database/default.aspx