Hello friends ,
I wrote one function which returned the departments record type.
when ever I called the function that returned departments record type and stored in department record type variable..I have to print all the values in record...
What can I do???
My code is like this...
set serveroutput on
declare
type depcur is ref cursor return departments%rowtype;
dep depcur;
rec departments%rowtype;
function ref_cur_demo(ref1 in depcur) return departments%rowtype
is
v_dep departments%rowtype;
begin
loop
fetch ref1 into v_dep;
exit when ref1%notfound;
end loop;
return v_dep;
end;
begin
open dep for select *from departments;
rec:=ref_cur_demo(dep);
--Here I have to print all the record variables;
end;