In Oracle 9i and above, the following returns N number of rows:
select * from (
select level lvl
from dual
connect by level <= N
)
This can sometimes come in handy in your SQL statements.
Possibly related:
- Using CUBE to generate rows
- Insert into DUAL
- DUAL behavior change
- Forgotten SQL Function: LEAST
- More on Generating Strings
Tagged sql | Post a Comment


















[…] I found this useful tip on Eddie Awad’s blog . He left a comment on mine and that’s how I found him. He’s an Oracle application developer and runs quite an interesting blog. Shouldn’t he be on OraBlogs? […]
July 1st, 2005, at 11:07 pm #