Oracle/SQL Fundamentals II
15일차 # 7-3 ~ 5: Hierarchical Query (계층 질의)
Bohemian life
2012. 4. 24. 14:08
- a relationship exists between rows in the same table
=> a kind of self-join
- restriction: SELECT can NOT contain a join or query of join
- tree walking: null이 나올 때까지
* Clauses
- START WITH: starting point of tree walking
CAN contain a subquery
omitted, all row are considered as root rows
- CONNECT BY: direction of tree-walking
can NOT contain a subquery
- PRIOR: Parent Row
can be in connect by and select-list clauses
can be in either side of condition
* Hierarchical Query Pseudocolumn
- LEVEL