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

Which datatype is used for email in mysql?

0 Answers  


How many columns is too many mysql?

0 Answers  


Is SET Command is SQL Statement..?

4 Answers   BitWise,


Is mysql better than oracle?

0 Answers  


How to delete a trigger in mysql?

0 Answers  






How to connect html form to mysql database using php?

0 Answers  


How do you control the max size of a HEAP table?

1 Answers  


How to convert character strings to numeric values?

0 Answers  


What are the purposes of using enum and set data types?

0 Answers  


How to change a password for an existing user via mysqladmin?

0 Answers  


how you will show all records not containing the name "sonia" and the phone number '9876543210' order by the phone_number field.

0 Answers  


Can we rename database in mysql?

0 Answers  


Categories