Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSQLupserts ON CONFLICT MERGESingle-choice MCQ

A single INSERT ... ON CONFLICT DO NOTHING inserts a batch where two of the proposed rows have the SAME conflicting key as each other (and neither exists yet in the table). What is the result?

INSERT INTO t (id, v) VALUES (1, 'a'), (1, 'b') -- same key as previous row ON CONFLICT (id) DO NOTHING;