Monday, March 3, 2008

SQL Trigger Order Control

Good quick read on controlling the firing order of 2 or 3 triggers which fire on the same table action. (More than 3 triggers can NOT be controlled)

I have two triggers defined on my table which are set to fire on the same table actions (i.e. an INSERT, DELETE, UPDATE transaction). The second trigger that fires is dependent on the first fired trigger. How can I make sure that they fire in the correct order to enforce my business logic? In addition, as our system changes, what are some of the caveats that I need to be aware of when managing the trigger firing order?

http://www.mssqltips.com/tip.asp?tip=1409

No comments: