Sunday, 25 September 2022

Postgresql - Compare two tables and identify & change rows

 INSERT INTO target 

    (id, name, location, flag,ad_org_id)

    (

        SELECT 

            s.id, s.name, s.location, s.flag,s.ad_org_id 

        FROM source s

    

ON CONFLICT (id,ad_org_id) 

DO UPDATE

SET 

name = excluded.name,

location = excluded.location,

flag=excluded.flag ;

No comments:

Kiro - Core Features

What is Kiro Kiro is an innovative AI-powered IDE that revolutionizes software development through intelligent assistance and structured wor...