大家可以參考下:關于超過5萬之后,的漲工資判斷。
--漲工資
--2.漲后的工資總額=漲錢的工資總額+money*0.1
moneyTotal:=moneyTotal+pmoney*0.1
--員工漲后,工資總額超過50000就全部不漲
if moneyTotal<50000
then update emp set money=money*1.1 where id=pid;
--人數(shù)
countEmp:=countEmp+1;
else countEmp:=0;
end if;
老師留下的作業(yè)有兩個方法1、加個退出條件exit when (saltotal+psal*0.1)>50000;
2、在循環(huán)后面加個if語句 if saltotal>50000 then countemp:=countemp-1;saltotal:=saltotal-psal*0.1;