不加参数的存储过程

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;

 

posted on 2014-07-15 14:48  hrbust_09zhangyabin  阅读(185)  评论(0编辑  收藏  举报