update fobupricdetail t1
set fobpriceusd2 = (select fobpriceusd2 from PUR_TEMP where cgicode = t1.cgicode and rownum = 1)
where exists (select 1 from PUR_TEMP where cgicode = t1.cgicode) and t1.fobupricicode = '1000000000002373'
update fobupricdetail t1 set usdbalance = fobpriceusd2 - fobpriceusd where fobupricicode = '1000000000003885'
update ccode t1 set (t1.pjcontact1,t1.pjphone1,t1.pjemail1,t1.pjcontact2,t1.pjphone2,t1.pjemail2)=
(select t2.pjcontact1,t2.pjphone1,t2.pjemail1,t2.pjcontact2,t2.pjphone2,t2.pjemail2 from ccode_tmp t2
where t1.ccode = t2.ccode) where exists (select 1 from ccode_tmp where ccode=t1.ccode)
多字段更新
update student A
set (A.name,a.dq) =
(select B.bname,b.bdq
from newstudent B
where B.Bid = A.id
and A.dq = 10
)
where exists (select 1
from newstudent B
where B.Bid = A.id
and A.
更新原来的数据
update fobupricdetail a set fobpriceusd2 = (select fobpriceusd2 from fobupricdetail b where fobupricicode='1000000000009903' and b.cgicode=a.cgicode)
where exists (select 1
from fobupricdetail b
where b.cgicode=a.cgicode
) and cgicode in (
select cgicode from fobupricdetail where fobupricicode='1000000000009903'
) and destccode = 'NA' and fobupricicode!='1000000000009903'
and orderclass = 'PT'
and status = '80'