查看所有触发器
show triggers;
删除触发器
DROP TRIGGER IF EXISTS table1_trigger;
创建触发器(举例 当table1的INSERT发生时触发)
CREATE TRIGGER `table1_trigger` AFTER INSERT ON `table1` FOR EACH ROWBEGIN INSERT INTO table2VALUES ( new.ID, new.STATUS, new.TIME, );END;
本文共 321 字,大约阅读时间需要 1 分钟。
show triggers;
DROP TRIGGER IF EXISTS table1_trigger;
CREATE TRIGGER `table1_trigger` AFTER INSERT ON `table1` FOR EACH ROWBEGIN INSERT INTO table2VALUES ( new.ID, new.STATUS, new.TIME, );END;
转载于:https://www.cnblogs.com/virtulreal/p/9749839.html