Oracle Bulk Collect 学习

create or replace procedure Test_Bulk  is
 
Type MBList is Table of BA_T_MB%Rowtype;
i integer;
mb MBList;
code varchar2(100);
chinesename varchar2(100);
begin
  select * BULK COLLECT into  mb from Ba_t_Mb where rownum<100;
  for i in 1 .. mb.count loop
    code := mb(i).p_1;
     chinesename := mb(i).P_2;
    insert into T_BA_TJMB (P_1,P_2) values (code,chinesename);
  end loop;
  commit;
end Test_Bulk;


你可能感兴趣的:(Oracle Bulk Collect 学习)