SELECT TO_CHAR(ADD_MONTHS(TO_DATE('2022-01', 'yyyy-MM'), ROWNUM - 1), 'YYYY-MM') as monthlist FROM DUAL
CONNECT BY ROWNUM <= months_between(to_date('2022-03', 'yyyy-MM'), to_date('2022-01', 'yyyy-MM')) + 1
SELECT TO_CHAR(ADD_MONTHS(TO_DATE('2022-01', 'yyyy-MM'), ROWNUM - 1), 'YYYY-MM') as monthlist FROM DUAL
CONNECT BY ROWNUM <= months_between(to_date('2022-03', 'yyyy-MM'), to_date('2022-01', 'yyyy-MM')) + 1