DECLARE
 i number;
 j number;
BEGIN
 i := 1;
 j := 0;
 
select count(*) into j from table where scenaio = 0 ;
loop 
 exit when i > j ;
 update  table set scenaio = 1 where scenaio = 0 and rownum <= 5000;
 i := i + 5000;
 commit;
END loop;
END;

 

posted on 2021-01-20 21:26  陕西小楞娃  阅读(152)  评论(0编辑  收藏  举报