update tablename1 set col1=a.col1 from tablename2 a where tablename1.id=a.id ...条件

解决方案 »

  1.   

    update table1 set column1=b.column
    from 
       table1 a,
       table2 b
    where conditions
      

  2.   

    UPDATE table1 set col1=a.col1 
    FROM table2 a 
    WHERE table1.id=a.id 应该不会出理所有的行都是一样的问题,但前掉是两个表有关联字段,要确定这两个表是否有关联。
      

  3.   

    UPDATE table1 set col1=a.col1 
    FROM table2 a 
    WHERE table1.id=a.id 应该不会出现所有的行都是一样的问题,但前掉是两个表有关联字段,要确定这两个表是否有关联。