begin
declare
cursor c_update is
select rowid row_id
from E_INV_INVESTMENT where (invtype in ('10','11','12','13','14','20','21','22','30','35','36'))or (regexp_like(cerno,'([0-9]|[x]|[X]){18}$') and invtype in ('15','31','32','33','34','40','50','90'));
v_counter number := 0;
begin
for one_row in c_update loop
v_counter := v_counter + 1;
update E_INV_INVESTMENT SET CERNO='' where rowid = one_row.row_id;
if (v_counter = 1000) then
v_counter := 0;
commit;
end if;
end loop;
commit;
end;
end;
/
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/30345407/viewspace-1967659/
,如需转载,请注明出处,否则将追究法律责任。