DB/ORACLE

계층형 쿼리

Kang_hobin 2022. 1. 17. 09:02

정리는 나중에..

	SELECT IDX
	     , PARENT
	     , SYS_CONNECT_BY_PATH(NAME, '>') AS NAME_SEQ  
	     , NAME
	     , LEVEL AS LVL
	  FROM TB_COURSE /* 모집과정 */
	 START WITH PARENT = 0 CONNECT BY PRIOR IDX = PARENT