create or replace procedure bulk_insert(in_bulk_count integer)
is
cursor cur is select * from b;
type tbl_b is table of b%rowtype index by pls_integer;
v_tbl_b tbl_b;
begin
open cur;
loop
<<bulk_insert>>
exit when cur%notfound;
fetch cur bulk collect into v_tbl_b limit in_bulk_count;
forall i in indices of v_tbl_b save exceptions
insert /*+append*/ into a values v_tbl_b(i);
commit;
exception
when others then
null;
end loop bulk_insert;
close cur;
end;