Throw an error preventing a table update in a MySQL trigger

database, mysql, triggers

Solution

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.

Problem

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

Original source