In the MySQL5.6 version, a table with multiple insert/delete/update triggers is not supported.
For example, create a T1 table with two insert triggers:
DELIMITER $ $USE ' test ' $ $DROP TRIGGER/*!50032 IF EXISTS */' t1_1 ' $ $CREATE/*!50017 definer = ' admin ' @ '% ' */TRIGGER ' T1_1 ' after INSERT on ' T1 ' for each ROW begininsert into T2 (id,name) VALUES (new.id,new.name); end;$ $DELIMITER;
DELIMITER $ $USE ' test ' $ $DROP TRIGGER/*!50032 IF EXISTS */' t1_2 ' $ $CREATE/*!50017 definer = ' admin ' @ '% ' */TRIGGER ' T1_2 ' after INSERT on ' T1 ' for each ROW begininsert into t3 (id,name) VALUES (new.id,new.name); end;$ $DELIMITER;
Execution of the time will be error, as follows:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4F/C1/wKiom1Rh1N7A1IG1AAFIsiQVM2A408.jpg "title=" 11.jpg "alt=" Wkiom1rh1n7a1ig1aafisiqvm2a408.jpg "/>
In MySQL5.7, a table has been supported with multiple insert/delete/update triggers.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4F/C4/wKioL1Rh14PxFBWjAASF3brc-1w673.jpg "title=" 33.jpg "alt=" Wkiol1rh14pxfbwjaasf3brc-1w673.jpg "/>
Reference:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4F/C9/wKiom1Rh2ODQNAUvAADVkfkyxSo692.jpg "style=" float: none; "title=" 5.jpg "alt=" Wkiom1rh2odqnauvaadvkfkyxso692.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4F/C8/wKioL1Rh2UvR9WpUAAEYgJJBZQc045.jpg "style=" float: none; "title=" 6.jpg "alt=" Wkiol1rh2uvr9wpuaaeygjjbzqc045.jpg "/>
This article is from the "Spring Yang Technical column" blog, please be sure to keep this source http://hcymysql.blog.51cto.com/5223301/1575443
MySQL5.7 supports a table with multiple insert/delete/update triggers