日期:2014-05-16 浏览次数:20498 次
SELECT TO_CHAR( add_months(to_date('2011-03', 'yyyy-mm'), ROWNUM - 1), 'YYYY-MM' ) as yearMonth FROM DUAL CONNECT BY ROWNUM <= ( select months_between(to_date('2012-07', 'yyyy-mm'), to_date('2011-03', 'yyyy-mm')) from dual )
SELECT TO_CHAR( add_months(to_date('2011-03', 'yyyy-mm'), ROWNUM - 1), 'YYYY-MM' ) as yearMonth FROM all_objects where ROWNUM <= ( select months_between(to_date('2012-07', 'yyyy-mm'), to_date('2011-03', 'yyyy-mm')) from dual )