楼ä¸çåªç»è®¡äºä¸ä¸ªæçå§
WITH t AS
(SELECT ROWNUM
FROM DUAL
CONNECT BY ROWNUM <= 12)
SELECT TO_CHAR (LAST_DAY (TO_DATE ( TO_CHAR (SYSDATE, 'YYYY')
|| LPAD (TO_CHAR (ROWNUM), 2, 0),
'YYYYMM'
)
),
'YYYY-MM'
)
|| 'æ',
TO_CHAR (LAST_DAY (TO_DATE ( TO_CHAR (SYSDATE, 'YYYY')
|| LPAD (TO_CHAR (ROWNUM), 2, 0),
'YYYYMM'
)
),
'DD'
)
|| '天'
FROM t
ç´æ¥å
¨éå¤å¶ç²è´´è¿è¡
追é®ææ³éå®ææå°±åºæ¥ææç天æ°ï¼è¦æä¹å¼å¢
追çselect add_months(to_date('201202', 'YYYYMM'),1)-to_date('201202', 'YYYYMM') from dual
ä½ ææ份æ¹ä¸ä¸å°±OK