Re: ref cursor giving error
sorry
i was wrong sorry to post a silly thing with heavy mistake.
Re: ref cursor giving error
Please check the following sample code. ============================ declare type empcurtyp is ref cursor; type namelist is table of emp.ename%type; type sallist is table of emp.sal%type; emp_cv empcurtyp; names namelist; sals sallist; begin open emp_cv for select ename,sal from emp where sal < 3000; fetch emp_cv bulk collect into names, sals; close emp_cv; for i in names.first .. Names.last loop dbms_output.put_line('name = ' || names(i) || ', salary = ' || sals(i)); end loop; end; hope helps you in solving your problem.