Created
May 2, 2013 15:57
-
-
Save jkatz/5503219 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH old_rows AS ( | |
SELECT a, b, c | |
FROM update_me | |
WHERE blah = true | |
), new_rows AS ( | |
UPDATE update_me | |
SET a = 4, b = 5, c = 6 | |
FROM old_rows | |
WHERE blah = true | |
) | |
SELECT * | |
FROM old_rows; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment