MySQL does not support multiple INSERTDELETEUPDATE triggers for a table. For example, create two INSERT triggers for table t1: DELIMITER $ USE 'test' $ DROPTRIGGER *! 50032IFEXISTS * 't.
MySQL does not support multiple INSERT/DELETE/UPDATE triggers for a table. For example, create two INSERT triggers for table t1: DELIMITER $ USE 'test' $ DROPTRIGGER /*! 50032IFEXISTS */'t.
MySQL does not support multiple INSERT/DELETE/UPDATE triggers for a table.
For example, create two INSERT triggers for table t1:
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;
An error is reported during execution, as shown below:
This article is from the "hechun's technical column" blog. Be sure to keep this source