Check out example codes for "trigger in mysql syntax". It will help you in understanding the concepts better.

Code Example 1

CREATE TRIGGER trigger_name
{BEFORE | AFTER} {INSERT | UPDATE| DELETE }
ON table_name FOR EACH ROW
trigger_body;

Learn ReactJs, React Native from akashmittal.com