Using CONNECT BY NOCYCLE and CONNECT_BY_ISCYCLE
(Doc ID 1404713.1)
Last updated on JANUARY 30, 2022
Applies to:
Oracle Database - Standard Edition - Version 10.1.0.2 and laterOracle Database - Personal Edition - Version 10.1.0.2 and later
Oracle Database - Enterprise Edition - Version 10.1.0.2 and later
Oracle Database Cloud Schema Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Information in this document applies to any platform.
Purpose
A hierarchical SELECT statement (using CONNECT BY) can be a powerful way to query hierarchical data. Since version 10g, hierarchical SELECT statements have had support for cyclic data by using NOCYCLE as well as the CONNECT_BY_ISCYCLE pseudocolumn. But the use of this feature can be difficult to understand and can produce surprising results. This document will demonstrate how the feature works with a few simple examples.
Scope
This document is directed at application developers who wish to better understand how to use CONNECT BY NOCYCLE.
Details
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Purpose |
Scope |
Details |
Example 1 (Cyclic Tree) |
Example 2 (Directed Cyclic Graph) |
Summary |
NOCYCLE |
PRIOR |
CONNECT_BY_ISCYCLE |