update emp set sal=sal*(1+0.1) where empno=pempno;
total_sal:=total_sal+psal*0.1;
countemp:=countemp+1;
if total_sal>50000 then
total_sal:=total_sal-psal*0.1;
update emp set sal=sal/1.1 where empno=pempno;
countemp:=countemp-1;
end if;
total_sal:=total_sal+psal*0.1;
countemp:=countemp+1;
if total_sal>50000 then
total_sal:=total_sal-psal*0.1;
update emp set sal=sal/1.1 where empno=pempno;
countemp:=countemp-1;
end if;
2015-12-17
totalsal:=totalsal+psal;
累计方式得到部门总工资的方法,在部门光标里初始化,在员工光标里累加就行,不知道对不对
累计方式得到部门总工资的方法,在部门光标里初始化,在员工光标里累加就行,不知道对不对
2015-12-13