ref cursor kullanmak

Hello,

RefCursor example:

declare
type TRefCursor is ref cursor;
vc TRefCursor;
vr dual%rowtype;
begin

open vc for 'select * from dual';
loop
fetch vc into vr;
exit when vc%notfound;
dbms_output.put_line( 'dummy='||vr.dummy );
end loop;
if( vc%isopen )then close vc; end if;
end;
The main difference it could be dinamic.

Hiç yorum yok: