update语句把一张表里的列赋值到另一张表里的列(急)

解决方案 »

  1.   

    update ta
    set col=b.col
    from ta a,tb b
    where a.id=b.id
      

  2.   

    update ta set a=b.a from ta a join tb b on a.id=b.id
      

  3.   


    update a set col=b.col
    from [ta] a inner join [tb] b on a.id=b.id
      

  4.   

    update a
    set col=b.col
    from ta a,tb b
    where a.id=b.id
      

  5.   

    update ta
    set col=b.col
    from ta a,tb b
    where a.id=b.id
      

  6.   

    两表关联即可。update tb1
    set c1 = tb2.c1
    from tb1 , tb2
    where tb1.关键字 = tb2.关键字