Question

I have a mysql table which on any change (i.e. insert, update and delete) I need to run the relevant trigger code.
Do I need to create three different triggers or is there a syntax for just one.
Using mysql 5.1

Was it helpful?

Solution

Three triggers may perform better and AFAIK - there is no possibility to create multi-action trigger in MySQL, but I hope the syntax for one trigger is:

CREATE TRIGGER Name AFTER INSERT ON Table
FOR EACH ROW
begin
...
END
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top