I have declared a custom type
create type finalrecord as object(aaa varchar2(10),bb varchar2(25));
create type mytable is table of finalrecord;
and in my procedure i have written a for loop
create or replace procedure myprocedure(mytab out mytable)
.
.
for cursor1 in (select * from table)
loop
select * bulk collect into mytab
from table2 where table2.issueid = cursor1.id;
end loop;
end;
But i see only one row in mytab. I understand that bulk collect into overwrites the contents of mytab every time data is fetched. How do i avoid this and append data to the end of "mytab"