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.


Possibly related:


Tagged | Post a Comment