Thursday, April 6, 2017


             Return multiple values from function

create type my_type3 as object (a number,b varchar2(10) , c number , d varchar2(10));
/

create or replace function my3(a number,b varchar2 , c number , d varchar2 ) return my_type3
as
mobj my_type3;
begin
mobj := my_type3(a,b,c,d);
return mobj;
end;
/


select obj.x.a , obj.x.b,obj.x.c,obj.x.d from  (select my3(1,'A',2,'B') x from dual) obj;

No comments:

Post a Comment