orcal输入开始时间结束时间获取年月


SELECT DISTINCT(TO_CHAR(T.ROWDATE, 'yyyymm')) YYYYMM
FROM (
SELECT ROWNUM, TO_DATE('201805', 'yyyymm') + ROWNUM - 1 ROWDATE
FROM DUAL CONNECT BY ROWNUM < TO_DATE('201901', 'yyyymm') - TO_DATE('201805', 'yyyymm') + 2) T
ORDER BY YYYYMM

posted @ 2020-06-29 19:32  逆水乘舟,不进则退  阅读(170)  评论(0编辑  收藏  举报