Oracle - 계층형 쿼리
생성CREATE TABLE MENU(ID NUMBER PRIMARY KEY,PARENT_ID NUMBER , NAME VARCHAR2(20),ORD NUMBER,ICON VARCHAR2(50)) 부모 추가-- 부모INSERT INTO MENU( ID, PARENT_ID, NAME, ORD, ICON)VALUES( (SELECT NVL(MAX(ID), 0) +1 AS ID FROM MENU), 0, '설정', (SELECT NVL(MAX(ORD), 0) +1 AS ORD FROM MENU WHERE PARENT_ID = 0), 'fas fa-fw fa-wrench')INSERT INTO MENU( ID, PARENT_ID, NAME, ORD, ICON)VALUES( (SELE..
2024. 7. 31.