Throw an error in a MySQL trigger

后端 未结 7 1049
-上瘾入骨i
-上瘾入骨i 2020-11-22 11:59

If I have a trigger before the update on a table, how can I throw an error that prevents the update on that table?

7条回答
  •  太阳男子
    2020-11-22 12:55

    Here is one hack that may work. It isn't clean, but it looks like it might work:

    Essentially, you just try to update a column that doesn't exist.

提交回复
热议问题