Sql更新查询

这个问题在这里已经有了答案:

  • 如何从SQL Server中的SELECT进行更新? 27个答案

  • 怎么样

    UPDATE T1
    SET Address = T2.New_Address
    FROM T2
    WHERE T1.id = T2.id
    

    UPDATE T1
    SET T1.Address = T2.New_Address
    FROM T1
    INNER JOIN T2 ON T2.ID = T1.ID
    

    UPDATE T1
    SET Address = (select New_Address from T2 where T1.ID=T2.ID );
    
    链接地址: http://www.djcxy.com/p/16855.html

    上一篇: Sql Update Query

    下一篇: Update rows from another table