触发器提供的两个对象:
delimiter //--定义结束符号 CREATE TRIGGER triggerName [BEFORE|AFTER] [INSERT|DELETE|UPDATE] ON tableName FOR EACH ROW BEGIN IF NEW.success="xx" THEN INSERT INTO errlog(err_cmd,err_time) VALUES (NEW.cmd,NEW.sub_time); END IF; END;// delimiter;
DROP TRIGGER triggerName;
原文:https://www.cnblogs.com/yaya625202/p/9074061.html