--Where Current Of语句允许你更新或者是删除最后由cursor取的记录
declare
cursor c_emp is select * from emp2 for update;
begin
for v_emp in c_emp loop
if substr(v_emp.ename,1,1)='S' then
update emp2 set comm = nvl(comm,0)+1000 where current of c_emp;
end if;
end loop;
commit;
end;
select * from emp2;