How to create triggers in MySQL?



How to create triggers in MySQL?..

Answer / 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

More MySQL Interview Questions

How to use rank function in mysql?

0 Answers  


Is mysql a scripting language?

0 Answers  


What is heap table?

0 Answers  


How we can get distinct columns values in mysql?

0 Answers  


Does insert statement lock the table?

0 Answers  






suppose server is running Suddenly down . what can you do? but i want do not down the server?

3 Answers  


What is 'mysqlcheck'?

0 Answers  


Which is better mysql or mssql?

0 Answers  


How to see the create table statement of an existing table?

0 Answers  


How do I stop a mysql service?

0 Answers  


What is the use of i-am-a-dummy flag in mysql?

0 Answers  


what do you mean by longblob Data type in MySql?

3 Answers  


Categories