Can we fetch a cursor data into ref cursor variable??
Hi,
can any body please provide me a example or make sure that can we fetch a cursor into ref cursor data type variable??
but here it is working
declare
cursor c is select d.deptno,cursor( select * from emp e where e.deptno=d.deptno) emp_all from dept d;
v_deptno number;
v_all sys_refcursor;
v_a emp%rowtype;
begin
open c;
loop
fetch c into v_deptno,v_all;
exit when c%notfound;
dbms_output.put_line(v_deptno) ;
loop
fetch v_all into v_a;
exit when v_all%notfound;
dbms_output.put_line(v_a.
0