Generate n rows from dual
I needed to generate exactly n rows and then this is very handy.
select * from (
select level lvl
from dual
connect by level <= N
)
Found at: http://awads.net/wp/2005/07/01/generating-n-rows-from-dual/
2 years ago
My name is Stefan Oderbolz ("Odi") and I live in Zurich.
I'm currently working for Avaloq as a developer and I'm studying computer science at the HSR (University of Applied Science) in Rapperswil.
I needed to generate exactly n rows and then this is very handy.
select * from (
select level lvl
from dual
connect by level <= N
)
Found at: http://awads.net/wp/2005/07/01/generating-n-rows-from-dual/