select distinct (to_char(t.dt, 'yyyymm')) months
from (select rownum,trunc(to_date('201901', 'yyyymm')) + rownum - 1 dt from dual
connect by rownum < trunc(sysdate - 1, 'mm') - to_date('201901', 'yyyymm') + 2) t
order by months desc
oracle 指定月份到当前时间的所有月份排倒序
最新推荐文章于 2022-03-08 09:14:02 发布