varray.
-
create or replace type addr_type
as object
(name varchar2(20)
,city varchar2(20)
)
varray
create or replace type varr_addr as varray(10) of addr_type
/
varr_addr. :
SQL> create or replace procedure ret_user_addr (p_out out varr_addr)
2 is
3 begin
4 p_out := varr_addr(addr_type('NAME1','CITY1'),addr_type('NAME2','CITY2'));
5 end;
6 /
Procedure created.
SQL> sho err
No errors.
Now you need the out variable to be set correctly from where you are calling. And you can select from the table (VARIABLE_NAME), just like you.
source
share