News, views, tips and tricks on Oracle and other fun stuff

Generating N rows from DUAL

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.

Filed in Oracle, Tips on 01 Jul 05 | Tags:

Reader's Comments

  1. |

    […] 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? […]