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 Level giving multiple records

Pawan S-OracleMar 6 2019 — edited Mar 7 2019

SELECT level, ADD_MONTHS(SYSDATE,(level-1)*-1)  "Today "

FROM DUAL

CONNECT BY level = 2;

i am struggling with this query..

..

for level = 2 it is giving 2 records (I am expecting single record)

and any other value except 2 (i.e.->   3, 4, 5 etc...) it is giving only 1 record.

Can anyone explain the reason?

This post has been answered by BluShadow on Mar 6 2019
Jump to Answer
Comments
Post Details
Added on Mar 6 2019
17 comments
5,961 views