|
This is a bug in Oracle 9i release 1 (9.0.1)
Workaround:
Use ROWID instead of WHERE CURRENT OF as in
declare
cursor c1 is
select ename, ROWID
from emp
for update of sal;
l_rowid ROWID;
l_ename VARCHAR2(30);
l_empno NUMBER;
begin
open c1;
fetch c1 INTO l_ename,l_rowid;
if c1%found THEN
update emp
set sal = 666
where rowid=l_rowid returning empno INTO l_empno;
end if;
CLOSE c1;
end;
|