标签:mysql trigger 触发器 after before
#创建触发器test4 CREATE TRIGGER test4 AFTER INSERT ON `ord` FOR EACH ROW BEGIN UPDATE goods SET num= num - new.much WHERE goods_id = new.gid; END$$
#创建触发器test5 CREATE TRIGGER test5 BEFORE INSERT ON `ord` FOR EACH ROW BEGIN IF new.much >26 THEN SET new.much = 26; END IF; UPDATE goods SET num= num - new.much WHERE goods_id = new.gid; END$$
MySQL触发器 trigger之after与before区分
标签:mysql trigger 触发器 after before
原文地址:http://blog.csdn.net/guugle2010/article/details/40396189