开发者

What happens when I use UPDATE statements in an AFTER UPDATE trigger?

开发者 https://www.devze.com 2023-02-28 08:37 出处:网络
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\"?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消