SELECT TO_CHAR(ADD_MONTHS(TO_DATE('2014-10', 'yyyy-MM'), ROWNUM - 1), 'yyyy-MM') as monthlist FROM DUALCONNECT BY ROWNUM <= months_between(to_date('2015-06', 'yyyy-MM'), to_date('2014-10', 'yyyy-MM'))