postgresql 实现两表关联更新

UPDATE (要更新的表) table1 t1
SET t1.字段1 = t2.字段1, t1.字段2 = t2.字段2,
FROM
    (数据来源表) table2 t2
WHERE
    t1.key = t2.key

mysql 实现两表关联更新

UPDATE  (要更新的表)  table1 t1, table2 t2
SET t1.字段1 = t2.字段1, t1.字段2 = t2.字段2,
WHERE
    t1.key = t2.key