Good day. Tell me what's wrong with my trigger.
CREATE TRIGGER
t_ins_nameBEFORE INSERT ONecityFOR EACH ROW UPDATEecitySETname= UPPER (NEW.name)
it causes error 1442
You are trying to set a trigger that updates the entire table, for which it is assigned. As a result of its execution, an infinite tree of calls will be created (each update inside the trigger will trigger another update of the entire table, and for each affected entry, it will be necessary to call the trigger again), which MySQL does not allow to do.
EMNIP triggers do not have the right to work with the table on which they are installed.
Source: https://ru.stackoverflow.com/questions/518006/
All Articles