update tb1 set a1=b.b1 from tb1 a left join tb2 b on a.a1=b.b2 即可
update a set a1=b.b1 from tb1 a,tb2 b where a.a1=b.b2
update tb1 set a1=b1 from tb1,tb2 where a1=b2 //// update tb1 set a1=b1 from tb1 inner join tb2 on a1=b2 //// update tb1 set a1=(select b1 from tb2 where b2 = tb1.a1)
即可
set a1=b1
from tb1,tb2
where a1=b2
////
update tb1
set a1=b1
from tb1 inner join tb2
on a1=b2
////
update tb1
set a1=(select b1 from tb2 where b2 = tb1.a1)