使用场景:将某一张表的数据赋值到另一张表

 

update formtable_main_142_dt2 as grmx, (select bxlcid,fykm,sum(sbje) as sbje,sum(sbje2) as sbje2 from formtable_main_146_dt3 where bxlcid = 310315 group by fykm,bxlcid )  as ydmx set grmx.sbje = ydmx.sbje , grmx.sbje2  = ydmx.sbje2  where grmx.fykm = ydmx.fykm

 

Rick  38浏览  0评论  2021-08-09

上一篇