create or replace procedure p_postcode is
begin
declare
type ridArray is table of rowid;
type vcArray is table of NEW_jiangsu_1.youzhengbianma%type;
l_rids ridArray;
l_names vcArray;
cursor c is select rowid, youzhengbianma from NEW_jiangsu_1;
begin
open c;
loop
fetch c bulk collect into l_rids, l_names LIMIT 1000;
forall i in 1 .. l_rids.count
update NEW_jiangsu_1
set youzhengbianma = f_postcode(l_names(i))
where rowid = l_rids(i);
commit;
exit when c%notfound;
end loop;
close c;
end;
end;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8797129/viewspace-589368/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/8797129/viewspace-589368/