1,Test Windows 方式

declare
        maxrecords constant int:=1000;
        i int :=1;
    begin
        for i in 1..maxrecords loop
           insert into test2
           (id, name)
           values
           (test2_seq.nextval, to_char('9999'+i));
        end loop;
    dbms_output.put_line(' 成功录入数据! ');
    commit;
    end; 


2,从一张表里往另外的表里导入数据的命令

create or replace procedure TestProc is
begin
  for c in(select id, name from test2) loop
  insert into test
    (id,
     name)
  values
    (test_seq.nextval,
     c.name);
  end loop;
end TestProc;

 

这样是不是很方便处理大量测试集了呢?