select 1,2,3,distinct(b),c from A inner join B where A.1=B.1 and A.2=B.b
Update A Set 2 = B.b From B Where A.1 = B.1 And [其他条件]