Oracle Pseudocoloumns : LEVEL | Oracle PL/SQL Interview Questions

LEVEL
For each row returned by a hierarchical query, the LEVEL pseudocolumn returns 1 for a root row, 2 for a child of a root, and so on. A root row is the highest row within an inverted tree. A child row is any nonroot row. A parent row is any row that has children. A leaf row is any row without children. Figure 2-1 shows the nodes of an inverted tree with their LEVEL values.
left

 
To define a hierarchical relationship in a query, you must use the START WITH and CONNECT BY clauses.

No comments:

Post a Comment

Please Provide your feedback here