WITH t AS ( -- 기존 데이터 -- SELECT '202403' ym FROM dual UNION ALL SELECT '202406' FROM dual ) SELECT a.ym FROM (SELECT TO_CHAR(ADD_MONTHS(s, LEVEL - 1), 'yyyymm') ym FROM (SELECT TO_DATE('202401', 'yyyymm') s , TO_DATE('202412', 'yyyymm') e FROM dual ) CONNECT BY LEVEL <= MONTHS_BETWEEN(e, s) + 1 ) a LEFT OUTER JOIN t b ON a.ym = b.ym WHERE b.ym IS NULL ORDER BY a.ym ;