How to disable triggers in MySQL?

后端 未结 1 1888
刺人心
刺人心 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)
提交回复
热议问题