Insert into same table trigger mysql

后端 未结 4 1331
眼角桃花
眼角桃花 2020-12-12 03:35

I need to insert a discount line into a table everything time a I insert a line into the same table. Now i know that this could end in a endless loop but I have put checks i

4条回答
  •  借酒劲吻你
    2020-12-12 03:46

    It isn't allowed in MySQL.

    One solution would be to let the trigger insert two times into another table. Then you would do writes and updates to the write table and reads from the trigger managed read table.

提交回复
热议问题