The CREATE TRIGGER Statement : Introduction « Trigger « MySQL Tutorial






The CREATE TRIGGER statement is used to define a trigger.

The CREATE TRIGGER statement associates it with changes occurring in a table.

It has the following syntax:

CREATE TRIGGER <name> <time> <event>
ON <table>
FOR EACH ROW
<body statements>

With the time and event, you must choose from an enumerated set of options:

CREATE TRIGGER [BEFORE | AFTER] [INSERT | UPDATE | DELETE]









13.1.Introduction
13.1.1.The CREATE TRIGGER Statement
13.1.2.Activation Time
13.1.3.OLD and NEW Keywords