标签:where 变量 limit close not mit rowid open declare
declare
type ridarray is table of rowid; --类型rowid
type jqbharray is table of pj_zzsp_fpmx.jqbh%type; --类型jqbh
type kqrqarray is table of pj_zzsp_fpmx.kprq%type; --类型kprq
my_rids ridarray; --变量1 保存rowid
my_jqbh jqbharray; --变量2 保存jqbh
my_kprq kqrqarray; --变量3 保存kprq
cursor my_cur is select t2.rowid, t1.jqbh,t1.kprq from pj_zzsp_fpmx t1 ,pj_zzsp_fpmxzb t2 where t1.id=t2.mxid; --两表的关联条件
begin
open my_cur;
loop
fetch my_cur bulk collect into my_rids, my_jqbh,my_kprq LIMIT 100;
forall i in 1 .. my_rids.count
update pj_zzsp_fpmxzb t2 set jqbh = lower(my_jqbh(i)),kprq=lower(my_kprq(i)) where rowid = my_rids(i);
commit;
exit when my_cur%notfound;
end loop;
close my_cur;
end;
--160.697s
标签:where 变量 limit close not mit rowid open declare
原文地址:http://www.cnblogs.com/iyoume2008/p/6646809.html