UPDATE语句:将一个表里的字段更新到另一个表的字段里的语句时间:2023-03-09 03:44:54 update table2 b,(select b.area_id as arid,sum(a.user_amount) as bcount from table1 a,table2 b where a.user_area=b.area_id group by arid) c set b.count=c.bcount where b.area_id=c.arid;