Thursday, October 29, 2015

Oracle Objects

Function return from Object

create or replace function yobjtest(wh in varchar2,ws in varchar2,wc in varchar2)
return varchar2 is

   residence address;
BEGIN
   residence := address(wh, ws,wc, 'Rajasthan','201301');
   dbms_output.put_line('House No: '|| residence.house_no);
   dbms_output.put_line('Street: '|| residence.street);
   dbms_output.put_line('City: '|| residence.city);
   dbms_output.put_line('State: '|| residence.state);
   dbms_output.put_line('Pincode: '|| residence.pincode);
   return residence.house_no||' '||residence.street;
END;

No comments:

Post a Comment