create or replace procedure test1 is num_int integer; begin num_int := 1; loop insert into biao1(ls_id,ls_id2,terminal_id,tran_type,local_sys_date) select sys_guid() ls_id, sys_guid() ls_id2, terminal_id, tran_type, local_sys_date from biao2; num_int := num_int + 1; exit when num_int > 2; end loop; commit; end; begin test1(); end;