Learning how to create and use a trigger 

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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.240.222