select a.day, to_char(a.day, ‘day‘) as dd, 1 as flag,to_char(a.day,‘YYYY-MM-DD‘)
from (
SELECT TO_DATE(‘20150101‘, ‘YYYY-MM-DD‘) + LEVEL - 1 DAY,level
FROM DUAL
CONNECT BY TO_DATE(‘20150101‘, ‘YYYY-MM-DD‘) + LEVEL - 1 <=TO_DATE(‘20151231‘, ‘YYYY-MM-DD‘)
) a
时间: 2024-10-10 12:36:10