Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
kishore74
Starting Member
2 Posts |
Posted - 2013-12-04 : 23:23:59
|
Good Morning to every one.This is kishore.I am not understanding the T-SQL triggers.please explained with example.Thank you,Regards,kishore.Thank you,Regards,kishore. |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
kishore74
Starting Member
2 Posts |
Posted - 2013-12-05 : 08:18:55
|
Thank you for replaying visakh.BUTI have already see but i am n't understanding. please tell me another example.Thank you,Regards,kishore. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-12-05 : 12:09:20
|
first of tell as what part you didnt understandTriggers are like special type of stored procedures which will get executed in response to an event (DML/DDL/LOGON). You may right logic you want inside it which needs to be executed in response to each of the action. Also for DML trigger you can also control when it need to get executed (before or after the event designated by AFTER and INSTEAD OF triggers) and defined for each of the events (INSERT/UPDATE/DELETE). DML triggers work by means of two internal temporary tables INSERTED and DELETED which assume the structure of table on which trigger is defined.INSERTED will contain values which are inserted in case of INSERT operations and modified values in case of UPDATE operationsDELETED will contain values which are deleted in case of DELETE operation and old values in case of UPDATES------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|