WITH T AS ( SELECT '12801186' EMPNO , 1 SEQ ,2 NEXT_SEQ FROM DUAL UNION ALL SELECT '12507557' , 2 ,3 FROM DUAL UNION ALL SELECT '12507558' , 3 ,4 FROM DUAL UNION ALL SELECT '12507526' , 4 ,1 FROM DUAL ) -- 서브 쿼리 SELECT EMPNO , SEQ , NEXT_SEQ , (SELECT EMPNO FROM T a WHERE a.SEQ = T.NEXT_SEQ) NEXT_EMPNO FROM T -- SELF JOIN SELECT a.EMPNO , a.SEQ , a.NEXT_SEQ , b.EMPNO NEXT_EMPNO FROM T a , T b WHERE a.NEXT_SEQ = b.SEQ ORDER BY a.SEQ