سؤال

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

هل كانت مفيدة؟

المحلول

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
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top