which row should have value 1 for its pseudo column connect_by_iscycle ?
---populate test table
create table family1(fatherid number,childid number);
insert into family1 values(null,1);
insert into family1 values(1,2);
insert into family1 values(1,3);
insert into family1 values(2,4);
insert into family1 values(4,1);
insert into family1 values(4,5);
commit;
select * from family1;
FATHERID CHILDID
---------- ----------
1
1 2
1 3
2 4
4 1
4 5
-----Now combine "nocycle" with pseudocolumn connect_by_iscycle in some similar hierarchical queries but
Example 1:
select connect_by_iscycle,fatherid,childid,ltrim(sys_connect_by_path(childid,'->'),'->') from family1 start with fatherid is null connect by nocycle prior childid=fatherid;
CONNECT_BY_ISCYCLE FATHERID CHILDID LTRIM(SYS_CONNECT_BY_PATH(CHIL
---------------------------- ---------- ------------------ --------------------