Created
December 22, 2019 17:41
-
-
Save mwotton/a60412f0ad815d5ab7c20c3f52892847 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
CREATE TABLE | |
INSERT 0 2 | |
x | |
--- | |
4 | |
5 | |
(2 rows) | |
x | |
--- | |
4 | |
5 | |
(2 rows) |
This file contains hidden or 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
create table foo (x int not null); | |
insert into foo (x) values (3),(4); | |
with recursive updater as ( | |
update foo | |
set x=x+1 | |
where x<10 | |
returning * | |
) select * from updater; | |
select * from foo; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment