SELECT TO_CHAR(TO_DATE(TO_CHAR(SYSDATE, 'YYYY-MM'), 'YYYY-MM') + (ROWNUM - 1) ,'YYYY-MM-DD') DAY_ID
FROM DUAL
CONNECT BY ROWNUM <= TO_NUMBER(TO_CHAR(sysdate,'DD')) ;
oracle 获取当前月第一天至当前日期
最新推荐文章于 2022-09-28 11:24:55 发布
SELECT TO_CHAR(TO_DATE(TO_CHAR(SYSDATE, 'YYYY-MM'), 'YYYY-MM') + (ROWNUM - 1) ,'YYYY-MM-DD') DAY_ID
FROM DUAL
CONNECT BY ROWNUM <= TO_NUMBER(TO_CHAR(sysdate,'DD')) ;