WITH table_a AS ( SELECT 1 seq, 'seoul,busan' city_cd FROM dual UNION ALL SELECT 2, 'busan' FROM dual UNION ALL SELECT 3, 'busan,ulsan' FROM dual ) , table_b AS ( SELECT 'busan' city_cd, '부산' city_nm FROM dual UNION ALL SELECT 'seoul', '서울' FROM dual UNION ALL SELECT 'ulsan', '울산' FROM dual ) SELECT a.seq , a.city_cd , LISTAGG(b.city_nm, ',') WITHIN GROUP(ORDER BY INSTR(','||a.city_cd||',', ','||b.city_cd||',')) city_nm FROM table_a a , table_b b WHERE INSTR(','||a.city_cd||',', ','||b.city_cd||',') > 0 GROUP BY a.seq, a.city_cd ;