How to disable triggers in MySQL?

后端 未结 1 1889
刺人心
刺人心 2020-12-14 01:40

In my MySQL database I have some triggers ON DELETE and ON INSERT. Sometimes I need to disable some triggers, and I have to DROP e.g.<

相关标签:
1条回答
  • 2020-12-14 02:22

    Its not possible to temporarly disable triggers. Do one thing, use one global variable. Trigger will first check value of global variable first. In this case you can change value of global variable to prevent working of trigger.

    0 讨论(0)
提交回复
热议问题