📜  upsert postgres - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:07.459000             🧑  作者: Mango

代码示例1
INSERT INTO table_name(column_list)
VALUES(value_list)
ON CONFLICT target [DO NOTHING]

-- or 
    
INSERT INTO table_name(column_list)
VALUES(value_list)
ON CONFLICT target DO UPDATE SET column_1 = value_1, .. WHERE condition]