发布网友 发布时间:2022-05-05 07:54
共1个回答
热心网友 时间:2022-05-05 09:23
用触发器来完成DELIMITER |CREATE TRIGGER trigger_insert AFTER INSERT ON sys_kakaFOR EACH ROW BEGIN update user set jifen=(select sum(level) from sys_kaka where id=user.id and pid=2)*10;追答是的
用触发器来完成
DELIMITER |
CREATE TRIGGER trigger_insert AFTER INSERT ON sys_kaka
FOR EACH ROW
BEGIN
update user set jifen=(select sum(level) from sys_kaka where id=user.id and pid=2)*10;
END |
CREATE TRIGGER trigger_insert AFTER update ON sys_kaka
FOR EACH ROW BEGIN
update user set jifen=(select sum(level) from sys_kaka where id=user.id and pid=2)*10;
END |