declare
cursor c1 is
select rowid from wjf.wjf_t01 where state is null;
type typ_row_id is table of urowid index by binary_integer;
v_doi typ_row_id;
begin
open c1;
loop
fetch c1 bulk collect
into v_doi limit 10000;
forall v_rec in 1 .. v_doi.count
update wjf.wjf_t01
set state = 1
where rowid = v_doi(v_rec);
commit;
exit when c1%notfound;
end loop;
close c1;
commit;
end;
cursor c1 is
select rowid from wjf.wjf_t01 where state is null;
type typ_row_id is table of urowid index by binary_integer;
v_doi typ_row_id;
begin
open c1;
loop
fetch c1 bulk collect
into v_doi limit 10000;
forall v_rec in 1 .. v_doi.count
update wjf.wjf_t01
set state = 1
where rowid = v_doi(v_rec);
commit;
exit when c1%notfound;
end loop;
close c1;
commit;
end;