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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Jignesh TrivediRank #16 · 50.3K reputationPosted Nov 1, 2012, 7:54 PM EDT
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.
Satyapriya NayakRank #47 · 31.5K reputationPosted Nov 1, 2012, 6:21 AM EDT
http://www.c-sharpcorner.com/uploadfile/shashikantray/create-delete-and-update-triggers-in-a-database/default.aspx
suren v112 reputationPosted Nov 1, 2012, 7:41 AM EDT
Sandeep Singh ShekhawatRank #147 · 15.6K reputationPosted Nov 1, 2012, 7:07 PM EDT
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 v112 reputationPosted Nov 2, 2012, 5:24 AM EDT