Skip to content

Instantly share code, notes, and snippets.

@dfdeshom
Created December 15, 2017 20:35
Show Gist options
  • Save dfdeshom/5abb73f97b7cc034f293cac211041578 to your computer and use it in GitHub Desktop.
Save dfdeshom/5abb73f97b7cc034f293cac211041578 to your computer and use it in GitHub Desktop.
INSERT INTO TABLE T(ID, ATTR1, ATTR2) VALUES (1,'A', 'B')
ON CONFLICT(ID) DO UPDATE SET
ATTR1=EXCLUDED.ATTR1,
ATTR2=EXCLUDED.ATTR2;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment