Using CONNECT BY LEVEL seems to return too many rows when performed on a table. What is the logic behind what\'s happening?
Assuming the following table:
<
You can use technique below to overcome this issue:
select id, level as lvl from a left outer join (select level l from dual connect by level <= 2) lev on 1 = 1 order by id