Created
August 15, 2016 15:31
-
-
Save lsemel/bfa046190e81b7bf6ec5af564eced835 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
PRAGMA page_size=1024; | |
BEGIN; | |
CREATE TABLE t1(x INTEGER PRIMARY KEY, y TEXT); | |
WITH RECURSIVE c(x) AS (VALUES(1) UNION SELECT x+1 FROM c WHERE x<250) | |
INSERT INTO t1(x,y) SELECT x*10, printf('%04d%.800c',x,'*') FROM c; | |
SAVEPOINT one; | |
SELECT count(*) FROM t1; | |
WITH RECURSIVE c(x) AS (VALUES(1) UNION SELECT x+1 FROM c WHERE x<250) | |
INSERT INTO t1(x,y) SELECT x*10+1, printf('%04d%.800c',x,'*') FROM c; | |
ROLLBACK TO one; | |
SELECT count(*) FROM t1; | |
SAVEPOINT twoB; | |
WITH RECURSIVE c(x) AS (VALUES(1) UNION SELECT x+1 FROM c WHERE x<10) | |
INSERT INTO t1(x,y) SELECT x*10+2, printf('%04d%.800c',x,'*') FROM c; | |
ROLLBACK TO twoB; | |
RELEASE one; | |
COMMIT; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment