tableA 字段 billid bxmoney
2001
tableB 字段 billid billmoney
2001 100
2001 150
2001 300
update tableA set bxmoney = (select sum(billmoney) from tableB where tableb.billid = tablea.billid GROUP BY tableb.billid);