sql - Repeated rows in 'connect by prior' clause in oracle -


i trying understand 'connect prior' clause in oracle. have created below table : create table emp_mgr ( mgr varchar2(10), emp varchar2(10) )

below data of table

mgr   emp null   f f      f      b f      c b      x b      y 

now, when run below query

select mgr,emp emp_mgr connect prior emp = mgr start mgr null 

below output of above query:

mgr     emp null     f f        f        b b        x b        y f        c 

i understand output completely. problem when execute same query without 'start with' clause getting below output :

mgr     emp f       f       b b       x b       y f       c b       x b       y null    f f       f       b b       x b       y f       c 

please explain why output repeated. why getting rows when not using start clause


Comments

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -