adspace


What is trigger in mysql with example?

Answer Posted / Vivekanand Ojha

In MySQL, a trigger is a stored procedure that is automatically executed when an event occurs on a specific table. For example, you could create a trigger to insert data into a log table every time a row is inserted into another table.nCREATE TRIGGER ins_log AFTER INSERT ON mytable FOR EACH ROW INSERT INTO mylog VALUES (NEW.id, NEW.column1, NEW.column2);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the current mysql version?

1105


How to Change a users password from unix shell.

1223


Which statement is used in a select query for partial matching?

1247


What is current version of mysql?

1084