首页 > 代码库 > sql更新语句

sql更新语句

update YF_MZFYZD set jjje=tbl.jjje from (select a.xh,sum(b.jjje) jjje from YF_MZFYZD a(nolock),YF_MZFYMX b(nolock)
 where a.xh=b.fyxh group by a.xh) tbl,YF_MZFYZD x where tbl.xh=x.xh and isnull(x.jjje,0)=0

sql更新语句