mysql 触发器

查看所有触发器
show  triggers;
删除触发器
DROP 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;

 

posted @ 2018-10-07 12:37  王子健  阅读(125)  评论(0编辑  收藏  举报