Skip to content

Instantly share code, notes, and snippets.

Created June 19, 2013 13:39
Show Gist options
  • Save anonymous/5814404 to your computer and use it in GitHub Desktop.
Save anonymous/5814404 to your computer and use it in GitHub Desktop.
better UPDATE
UPDATE election_results o
SET votes=n.votes, pro=n.pro
FROM ( VALUES (1,11,9),
(2,44,28),
(3,25,4)
) n(county_id,votes,pro)
WHERE o.county_id = n.county_id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment