sql - Is it possible Looping in trigger -
my trigger on table affected here:
update table_name set value = @value
now execute above query means trigger execute now
trigger after update begin . . update table_name set value = @value . . end
now 2nd update query execute means again trigger execute or not question.
maybe
in sql server, "direct trigger recursion"
this controlled 2 things
- "nested triggers" option @ server level controls trigger recursion.
see msdn: http://msdn.microsoft.com/en-gb/library/ms178101.aspx recursive_triggers
@ database level controls direct recursion. see http://msdn.microsoft.com/en-us/library/bb522682.aspx
for full details, see create nested triggers on msdn
note loop until @@nestlevel
reaches 32
Comments
Post a Comment