Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to print all values in record datatype?

krishnagopi614Dec 3 2013 — edited Dec 3 2013

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;

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 31 2013
Added on Dec 3 2013
2 comments
8,180 views