📅  最后修改于: 2022-03-11 15:04:52.842000             🧑  作者: Mango
#id column is assumed to be primary key
INSERT INTO destination_table(id,name)
SELECT id, name
FROM source_table s
WHERE NOT EXISTS (
SELECT 1
FROM destination_table d
WHERE d.id = s.id
);