update a set f2=f3
from a,b
where a.f1=b.f1

解决方案 »

  1.   

    这是SQL SERVER里的写法,不过这样A表的前两行就一样了:(
      

  2.   

    update a set f2=b.f3
    from a,b
    where a.f1=b.f1
      

  3.   

    如果b有f2
    update a set a.f2=b.f3
    from a,b
    where a.f1=b.f1
      

  4.   

    update a set a.f2=b.f3
    from a inner join b on a.f1=b.f1
      

  5.   

    update a set a.f2 = b.f3
      from a,b
       where a.f1=b.f1