set serveroutput on
declare
VEno Emp.Eno%TYPE;
VESalary Emp.ESalary%TYPE;
cursor cremp is
select Eno,ESalary from Emp;
begin
open cremp;
loop
fetch cremp into VEno,VESalary;
exit when cremp%notfound;
VESalary := VESalary + VESalary * 0.1;
if VESalary < 100000 then
update Emp set
ESalary = VESalary
where Eno = VEno;
end if;
end loop;
close cremp;
end;
/
commit;
/
No comments:
Post a Comment
Thanks for showing your interest
I will shortly get back to you