create table zdq_up (serial number,usernumber varchar2 (40),spip varchar2 (40),userid varchar2 (40))
//serial为递增列
declare
i int;
j int;
begin
i :=0;
j :=0;
select count(*) into j from zdq_up;
loop
update s2000_user_subscription a
set a.freetime='20000909235959',a.nextrentdate='20990909'
where a.serial>=i and a.serial<=i+500 and
exists (select 1 from zdq_up b where b.usercode=a.usernumber and b.productid=a.spip and b.subscribeopid=a.userid);
commit;
i := i + 500;
exit when i>j;
end loop;
end;
/
oracle批量提交
最新推荐文章于 2024-04-17 15:28:23 发布