Re: MySQL ERROR: Can't update table SQL trigger
As the manual makes clear, a Trigger cannot invoke Update or Insert on the table for which the Trigger is defined.
For that table, a Trigger can only change values in the row(s) for which it's defined by referencing OLD.column_name and setting NEW.column_name values (otherwise a Trigger could invoke infinite loops).
So, in a Trigger on an appointments table, an Update Trigger fired by a change in the starting time needs only to SET NEW values for appt duration or appt-ending time.
Subject
Views
Written By
Posted
3202
March 22, 2020 09:19AM
Re: MySQL ERROR: Can't update table SQL trigger
799
March 22, 2020 07:59PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.