Oracle大数据量更新引发的死锁问题解决方法及O(2)

create or replace procedure aaa(startdate in date, days in number) as
--生成的数据包含startdate当天
i number;
begin
  i := 0;
  while i < days loop
      insert into aaa1
      select sec_pkid.nextval,startdate + i,
      '字段名','字段名','字段名','字段名'
      from aaa2 t where collect_time = to_date('2018-11-09','yyyy-mm-dd');
      i := i+1;
      commit;
  end loop;
end aaa;

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/67bb2837e32b4e19182d4e6818bbeb9e.html