I want to create a view that enumerates all integers. Using the view in
the following way
select value
from all_integers
where value > 110 and value < 115
should return these values
111
112
113
114
Does anyone has a good solution.
I tried creating the view below but the performance was unaccaptable
for large integer.
create view all_integers as
select digit as value
from digits
union
select d1.digit + d2.digit*10
from digits d1, digits d2
union
select d1.digit + d2.digit*10 + d3.digit*100
from digits d1, digits d2, digits d3
union
select d1.digit + d2.digit*10 + d3.digit*100 + d4.digit*1000
...
Bookmarks