1 create or replace type t_test as object( 2 id integer, 3 rq date, 4 mc varchar2(60) 5 ); 6 7 create or replace type t_test_table as table of t_test; 8 9 create or replace function f_test_array(n in number default null) return t_test_table 10 as 11 v_test t_test_table := t_test_table(); 12 begin 13 for i in 1 .. nvl(n,100) loop 14 v_test.extend(); 15 v_test(v_test.count) := t_test(i,sysdate,‘mc‘||i); 16 end loop; 17 return v_test; 18 end f_test_array; 19 20 21 select * from table(f_test_array(10));