In which order MySQL will invoke the triggers if we created multiple triggers of same event and action time?

MySQLMySQLi Database

In this case, MySQL will invoke the triggers in the order in which they are created. But with the help of following options, we can change the order −

FOLLOWS option

This option allows the new trigger to activate after the existing trigger.

Syntax

FOR EACH ROW FOLLOWS trigger_name

PRECEDES option

This option allows the new trigger to activate before the existing trigger.

Syntax

FOR EACH ROW PRECEDES trigger_name
raja
Published on 22-Feb-2018 12:06:40
Advertisements