建立了一个这样的触发器:
drop trigger if exists t_vipinfor;
create trigger t_vipinfor
after insert on sellinfor for each row
begin
#select sinum*oprice*discount sellsum from sellinfor
# where vno =new.vno
#then
update vipinfor
set totalpay=totalpay+new.sinum*new.oprice*new.discount
where vipinfor.vno=new.vno
if (select totalpay from vipinfor where vno=new.vno)>=50000.00
then
update vipinfor
set vgno=(select vgno from vipgrade where vgname='金卡')
where vno=new.vno;
end if;
end
运行后报错:
Commands out of sync; you can't run this command now
为什么呢?
求教!!!