PL/SQL (MOSC)

MOSC Banner

Regarding Ref Cursor

edited Apr 16, 2013 3:28AM in PL/SQL (MOSC) 4 commentsAnswered
HI,I am having a doubt in this point of view

A Ref Cursor is not Updatable. The Result set represented by ref cursor is read-only. you cannot update the data base using ref cursor

But i had observed that in both cases i am able to update the data base using these examples

using static cursor

    declare
cursor c is select * from emp;
v_all c%rowtype;
begin
open c;
loop
exit when c%notfound;
fetch c into v_all;
update drk_emp set ename=v_all.ename||'Test' where empno=v_all.empno;
end loop;
close c;
end;

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center