maclema maclema - 1 year ago 85
MySQL Question

Throw an error in a MySQL trigger

If I have a

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

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download