This is not a good way to do things, but it could be done like this:
Code:
declare
cursor c is
select sal from emp
order by empno
for update of sal;
i integer :=0;
...
begin
for r in c loop
i := i+1;
update emp set sal = saltab(i)
where current of c;
end loop;
end;
/
There is no way to do that in one statement, unless you have the table of PK values.