1
Is there any way to update in the same table, being in another row, through a after insert
or before insert
?
1
Is there any way to update in the same table, being in another row, through a after insert
or before insert
?
1
According to this response from Stackoverflow, This is not possible in Mysql. Excerpt from documentation:
A stored Function or Trigger cannot Modify a table that is already being used (for Reading or writing) by the statement that Invoked the Function or Trigger.
An alternative suggested in the same answer is to create a stored procedure
that makes the action of trigger
plus the update
next to the same transaction
.
Please could post an example...
Browser other questions tagged mysql trigger
You are not signed in. Login or sign up in order to post.
Yes you do. Using
– adventistaam