LOOP
FETCH cemp INTO pnum,psal;
EXIT
WHEN (money +psal*0.1>50000)OR cemp%notfound;
UPDATE emp SET sal=psal*1.1 WHERE empno=pnum;
money :=money+psal*0.1;
num1 := num1+1;
END LOOP;
FETCH cemp INTO pnum,psal;
EXIT
WHEN (money +psal*0.1>50000)OR cemp%notfound;
UPDATE emp SET sal=psal*1.1 WHERE empno=pnum;
money :=money+psal*0.1;
num1 := num1+1;
END LOOP;
2016-10-10
5-3涨工资问题:不严密,假设涨前员工工资总额已为48000---49000,而最对低工资为3000,这意味着没有人工资能涨10%,都不能涨。
2016-10-01