Also read about RECURSIVE_TRIGGERS:http://msdn.microsoft.com/en-us/library/ms190739.aspxthe best thing to do in these cases is to test different scenarios for yourself. For example:set nocount ongocreate table junk_tb (i int primary key clustered)gocreate trigger tr_junk_tb_1 on junk_tb after insertasbegin set nocount on declare @inserted_count int ,@junk_tb_count int ,@msg varchar(200) ,@inserted_maxVal int insert junk_tb (i) select i + i from inserted select @inserted_count = count(*), @inserted_maxVal = max(i) from inserted select @junk_tb_count = count(*) from junk_tb set @msg = 'tr_junk_tb_1 - @inserted_count=' + convert(varchar, @inserted_count) + '; @junk_tb_count=' + convert(varchar, @junk_tb_count) + '; @inserted_maxVal=' + convert(varchar, @inserted_maxVal) raiserror(@msg, 10, 1) with nowaitendgocreate trigger tr_junk_tb_2 on junk_tb after insertasbegin declare @inserted_count int ,@junk_tb_count int ,@msg varchar(200) ,@inserted_maxVal int select @inserted_count = count(*), @inserted_maxVal = max(i) from inserted select @junk_tb_count = count(*) from junk_tb set @msg = 'tr_junk_tb_2 - @inserted_count=' + convert(varchar, @inserted_count) + '; @junk_tb_count=' + convert(varchar, @junk_tb_count) + '; @inserted_maxVal=' + convert(varchar, @inserted_maxVal) raiserror(@msg, 10, 1) with nowaitendgoprint 'tr_junk_tb_2 is last'exec sp_settriggerorder @triggername = 'tr_junk_tb_2', @order = 'last', @stmttype = 'insert'goinsert junk_tb (i)values (1)select * from junk_tbtruncate table junk_tbprint 'tr_junk_tb_2 is first'exec sp_settriggerorder @triggername = 'tr_junk_tb_2', @order = 'first', @stmttype = 'insert'insert junk_tb (i)values (1)select * from junk_tbgodrop table junk_tbgoOUTPUT:tr_junk_tb_2 is lasttr_junk_tb_2 - @inserted_count=1; @junk_tb_count=2; @inserted_maxVal=2tr_junk_tb_1 - @inserted_count=1; @junk_tb_count=2; @inserted_maxVal=1tr_junk_tb_2 - @inserted_count=1; @junk_tb_count=2; @inserted_maxVal=1i-----------12tr_junk_tb_2 is firsttr_junk_tb_2 - @inserted_count=1; @junk_tb_count=1; @inserted_maxVal=1tr_junk_tb_2 - @inserted_count=1; @junk_tb_count=2; @inserted_maxVal=2tr_junk_tb_1 - @inserted_count=1; @junk_tb_count=2; @inserted_maxVal=1i-----------12
Be One with the OptimizerTG