What happens when I use UPDATE statements in an AFTER UPDATE trigger?
I need to do some updating and inserting when a table gets updated to enforce correct data. Wi开发者_运维问答ll putting UPDATE statements in the trigger cause a sort of "loop"?
Thanks!
Updating the target table in a trigger will make the triggers to fire again.
You may figure out the recursion depth using TRIGGER_NESTLEVEL()
.
The recursion will stop after nested_triggers
repetitions (32
by default) or if RECURSIVE_TRIGGERS
is OFF
.
精彩评论