Here is 4 triggers which can be added to mysql table:
- before insert
- before update
- after insert
- after update
Suppose that all triggers were added to the table. Then the insert on duplicate executed. What trigger are executed and in what order?
Also insert on duplicate supports column
for access column value and VALUES(column)
for accessing new inserted value. How do they are mapped to NEW
and OLD
variables which are used in triggers?