Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

connect by rownum explaination

813348May 20 2011 — edited May 20 2011
hi i have a question

i want to know if i have to generate a series in sql i use forllowing query

select rownum from dual
connect by rownum <= 100


but if i use a table say employees in hr schema of oracle

select rownum from employees
connect by rownum <=100

I thought i will get again 100 records
But I get more than 200 records i.e 100 that sequence is generating and 107 that table has so total 207.
even if i put a where clause still i get 207 records

can any body please explain this to me?

thanks

Edited by: 810345 on May 20, 2011 7:49 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 17 2011
Added on May 20 2011
3 comments
5,975 views