Created
September 25, 2013 11:06
-
-
Save FrankDeGroot/6698127 to your computer and use it in GitHub Desktop.
Generate max 2^32 rows with a unique number.
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 a(n) as (select 0 union all select 1), | |
b(n) as (select 2*x.n+y.n from a x, a y), | |
c(n) as (select 4*x.n+y.n from b x, b y), | |
d(n) as (select 16*x.n+y.n from c x, c y), | |
e(n) as (select 256*x.n+y.n from d x, d y), | |
f(n) as (select 65536*x.n+y.n from e x, e y) | |
select top 100000000 n from f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment