Can’t update table ‘student’ in stored function/trigger because it is already used by statement which invoked this stored function/trigger

报错:报错:Can't update table 'student' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.

总结:

  1. MYSQL中触发器中不能对本表进行 insert ,update ,delete操作,以免递归循环触发

    1. 对于update 只能用set进行操作,insert与delete只能借助第二张表才能实现需求,如果可以最好用存储过程代替触发器
      ————————————————
      版权声明:本文为CSDN博主「一揽芳华」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
      原文链接:https://blog.csdn.net/weixin_42491103/article/details/97899837

转载请注明出处:

转载自http://lxfamn.cn/blog

未经允许不得转载:lxfamn » Can’t update table ‘student’ in stored function/trigger because it is already used by statement which invoked this stored function/trigger

赞 (0) 打赏

置顶推荐

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏