Seeder question: I have four triggers which run after an INSERT statement on a particular table - is there any way that I can set the order in which the triggers run? Are there any limitations?
You can only specify FIRST and LAST on the order of triggers using sp_SetTriggerOrder
.
My first reaction would be that 4 insert triggers is much too many. One trigger is too many most of the time. Triggers are a pain to maintain, they obfuscate code and hurt performance. I would use them only as a last resort.
I would recommend that you consolidate all the logic of the 4 triggers into 1 trigger and then you would have control over the order of execution of the sentences. I also agree with dportas, triggers are a pain, you should try to avoid them.
No one has followed this question yet.