引发错误,防止 MySQL 触发器中的表更新

2022-01-30 00:00:00 database mysql triggers

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

解决方案

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.

相关文章