oracle获取时间段之间的所有日期

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

posted @ 2019-05-20 14:26  冬天不眠  阅读(725)  评论(0编辑  收藏  举报