update a set income = b.sumInMonth
from TableA a
join (select username ,sum(incomeMonth) as sumInMonth from TableB group by username ) b on a.username = b.username
update TableA
set income = b.incomemonth
from tableA a,(select username , sum(incomemonth) as incomemonth from tableb group by username) b
where a.username = b.username