CREATE table1;
CREATE table2;
CREATE trigger1 ON table1 AFTER DELETE AS DELETE FROM table1;
CREATE trigger2 ON table1 AFTER DELETE AS DELETE FROM table2;
DELETE FROM table1
上次查询将触发trigger1
和trigger2
。
trigger1
是否再次触发trigger2
(如果设置了数据库默认选项)?
答案 0 :(得分:1)
这取决于服务器上的nested triggers
设置。参见:
答案 1 :(得分:1)
如果选项RECURSIVE_TRIGGERS设置为on并且配置“嵌套触发器”设置为1然后是触发trigger1将导致trigger1和trigger2再次触发,然后再触发等等至32级深度后触发。否则他们不会递归发射。