当前位置:Gxlcms > 数据库问题 > mysql 触发器

mysql 触发器

时间:2021-07-01 10:21:17 帮助过:2人阅读

TRIGGER IF EXISTS table1_trigger;
创建触发器(举例 当table1的INSERT发生时触发)
CREATE TRIGGER `table1_trigger` AFTER INSERT ON `table1` FOR EACH ROW
BEGIN
    INSERT INTO table2
VALUES
    (
        new.ID,
        new.STATUS,
        new.TIME,
    );
END;

 

mysql 触发器

标签:span   for   time   exists   insert   new   举例   code   rop   

人气教程排行