Populating database table column with corresponding values from another table in PostgreSQL

不问归期 提交于 2019-12-02 10:26:47
gulfy

Okay, so I answered my own question and inserted the web_strap values from the other table into the target table by using the following query:

UPDATE z_scrapestorm_rentals
    SET web_strap = pcpao_cols.web_strap
    FROM
        pcpao_cols
    WHERE Z_scrapestorm_rentals.address_1_line_trunc 
ILIKE pcpao_cols.address_one_line
    RETURNING pcpao_cols.web_strap;

What was missing from my original query I detailed in my question's "method 1" was the RETURNING keyword.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!