Answer
A trigger is a set of code which is executed in response to some
event.
E.g Update employee_perfomance table when a new task is inserted in task table.
Here, the trigger is “update” and the event is “inserting a new row”.
A trigger in MySQL is created using CREATE TRIGGER trigger_name. we need to
specify the trigger type.
When do you want the trigger to execute? This can be either BEFORE or
AFTER