查询一周日期SQL

[2011/03/23 13:08 | 分类: Oracle/MSSQL/MYSQL | by actimind ]
查询一周日期SQL:

SELECT TO_CHAR (dayofyear, 'yyyy-mm-dd') AS everyday
          FROM (SELECT     SYSDATE - 7 + LEVEL - 1 AS dayofyear
                      FROM DUAL
                CONNECT BY LEVEL <= 7)
Tags: , ,
Comments(0) | Trackbacks(0) | Reads(1964)
Add a comment
Nickname [Register]
Password Optional
Site URI
Email
Enable HTML Enable UBB Enable Emots Hidden Remember