我可以在MySQL中为多个表创建一个触发器吗?插入table_1或table_2中的任何一个后,我必须执行相同的任务,例如:
CREATE TRIGGER trigger-1_4_task1
AFTER INSERT ON `table_1`
FOR EACH ROW
BEGIN
.....task1
END //
CREATE TRIGGER trigger-2_4_task1
AFTER INSERT ON `table_2`
FOR EACH ROW
BEGIN
.... same task as task1
END //
我可以将上面的两个触发器组合起来,如:
CREATE TRIGGER trigger_4_task1
AFTER INSERT ON `table_1` OR `table_2`
FOR EACH ROW
BEGIN
..... task1
END//
由于