create or replace procedure saledisc(pid in number, amount in number) is
a number;
beginselect quantity into a
from saleonline.disc
where id=pid;if a>amount then
update saleonline.disc
set quantity=quantity-amount
where id=pid
endif
end
a number;
beginselect quantity into a
from saleonline.disc
where id=pid;if a>amount then
update saleonline.disc
set quantity=quantity-amount
where id=pid
endif
end
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货