获取一年时间的sql

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

上一篇:java中关键字super


下一篇:spark on yarn模式下配置spark-sql访问hive元数据