Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

A place to share commonly used scripts for SQL Server Database Administrators.

Moderators

SQL Server DBA Scripts

Controlling the trigger execution sequence - which trigger fires first, which fires last?

Jul 12 2012 12:00AM by Nakul Vachhrajani   

In a rare case when you need to control the execution sequence of database triggers, you can use the sp_settriggerorder statement to do so. However, the recommended best practice always remains that you should have business logic dependent upon execution sequence within stored procedures.

The following script shows how to set the hypothetical trigger - "dbo.trig_UpdateTrig01" - to fire after all other triggers on the table are executed.

--Change the trigger order
USE tempdb;
GO
sp_settriggerorder @triggername= 'dbo.trig_UpdateTrig01', @order='Last', @stmttype = 'INSERT';
GO

Please refer my post: http://beyondrelational.com/modules/2/blogs/77/posts/15588/0177-sql-server-control-the-trigger-execution-order.aspx for more details.


Nakul Vachhrajani
4 · 33% · 10564
3
 
1
 
0
Failed
 
 
 
0
Unwise



Submit

Your Comment


Sign Up or Login to post a comment.

"Controlling the trigger execution sequence - which trigger fires first, which fires last?" rated 5 out of 5 by 3 readers
Controlling the trigger execution sequence - which trigger fires first, which fires last? , 5.0 out of 5 based on 3 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]