Let's take a look at the following syntax for creating a trigger:
CREATE TRIGGER triggername
{BEFORE | AFTER} {INSERT | UPDATE| DELETE }
ON tablename FOR EACH ROW
triggerbody;
You can choose either BEFORE or AFTER, and either INSERT, UPDATE, or DELETE. You can name the trigger with a descriptive name, and you choose the table for your trigger in place of tablename. Finally, you put the logic in triggerbody.