This tutorial explains how to create an AFTER DELETE Trigger in MySQL with syntax and examples.
An AFTER DELETE Trigger means that MySQL will fire this trigger after the DELETE operation is executed.
The syntax to create an AFTER DELETE Trigger in MySQL is:
The name of the trigger to create.
It indicates that the trigger will fire after the DELETE operation is executed.
The name of the table that the trigger is created on.
Let's look at an example of how to create an AFTER DELETE trigger using the CREATE TRIGGER statement in MySQL.
If you had a table created as follows:
We could then use the CREATE TRIGGER statement to create an AFTER DELETE trigger as follows: