Skip to content

Instantly share code, notes, and snippets.

@tochi
Created July 27, 2019 01:51
Show Gist options
  • Save tochi/f6bd86f4caa3bb4490844afb389f0507 to your computer and use it in GitHub Desktop.
Save tochi/f6bd86f4caa3bb4490844afb389f0507 to your computer and use it in GitHub Desktop.
INSERT INTO "posts" ("id","title","description","created_at","updated_at")
VALUES
(1,'1つめの記事です','2018-08-22 01:14:24.649575','2018-09-01 00:45:18.474184'),
(2,'2つめの記事です','2018-08-22 01:14:24.649575','2018-09-01 00:45:18.474184')
ON CONFLICT (id) DO UPDATE SET "title"=EXCLUDED."title","updated_at"=EXCLUDED."updated_at" RETURNING "id"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment