How to create triggers in MySQL?

Answer Posted / hrindows@gmail.com

We can use the CREATE TRIGGER statement for creating a new trigger in MySQL.

SYNTAX:
CREATE TRIGGER trigger_name
(AFTER | BEFORE) (INSERT | UPDATE | DELETE)
ON table_name FOR EACH ROW
BEGIN
--variable declarations
--trigger code
END;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I install the latest mysql on ubuntu?

577


Is sql and mysql same?

583


Is mysql relational database?

556


What is the difference between mysql and oracle?

617


Is mysql good for large database?

573






What is the limit of mysql database?

566


What does mysql flush privileges do?

579


Can we write procedure in mysql?

577


What are date and time data types in mysql?

618


What is the use of procedure in mysql?

551


How to calculate the difference between two time values?

530


What is deterministic in mysql?

594


How do I backup mysql database on linux?

569


What is mysql command line?

592


What are programming functions?

557