a表 两个字段,一个id 一个数值
b表 两个字段 一个id 一个数值一种方法是
cursor a_c is
Select a_id,a_num
from a
cursor b_c is
Select b_num
from b where b_id=v_a_id ;
open a_c;
loop
fetch a_c into v_a_id ,v_num;
exit when c_lotid%notfound;
open b_c;
处理
close b_c;
end loop
close a_c;还是一句话 update b set b.num=(select b.num*a.num from a where a.id=b.id)
哪个效率高?
高的多不多
b表 两个字段 一个id 一个数值一种方法是
cursor a_c is
Select a_id,a_num
from a
cursor b_c is
Select b_num
from b where b_id=v_a_id ;
open a_c;
loop
fetch a_c into v_a_id ,v_num;
exit when c_lotid%notfound;
open b_c;
处理
close b_c;
end loop
close a_c;还是一句话 update b set b.num=(select b.num*a.num from a where a.id=b.id)
哪个效率高?
高的多不多
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货