![thumbnail](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FFcfUB%2FbtqEFDz3EXj%2FmonO048fX66S7sOn5Y5bo1%2Fimg.png)
[Oracle] 계층형 쿼리 ( Hierarchical Queries )
2020. 6. 7. 22:07
SQL
Hierarchical Queries If a table contains hierarchical data, then you can select rows in a hierarchical order using the hierarchical query clause 오라클에서만 사용할 수 있는 쿼리 계층형 정보를 표현하고자 오라클8부터 지원 [ 문법 ] START WITH condition1 CONNECT BY condition2 SELECT LPAD(' ', 2*(LEVEL-1)) || item_name item_names FROM BOM_SPHONE START WITH parent_id IS null CONNECT BY PRIOR item_id = parent_id START WITH condition1 c..