同一表触发和更新
DELIMITER //
CREATE TRIGGER Setmoney before UPDATE ON a
FOR EACH ROW
BEGIN
set new.pay_total=new.goods_amount-new.bonus+new.shipping_free;
set new.goods_total=new.goods_amount-new.bonus;
END;
//
在 a 表更改后,触发(不能用after)
DROP TRIGGER Setmoney; //删除触发器
select * from information_schema.triggers;//查看触发器