2015. 11. 25. 15:20 IT/MySQL
Mysql 전체 날짜 리스트 출력.
select a.Date
from (
select curdate() - INTERVAL (a.a + (10 * b.a) + (100 * c.a)) DAY as Date
from (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as a
cross join (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as b
cross join (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as c
) a
where a.Date between '2015-11-19' and '2015-11-24'
'IT > MySQL' 카테고리의 다른 글
mysql Process 조회. (0) | 2016.01.10 |
---|---|
이전의 INSERT 작업으로부터 생성된 ID를 반환 (0) | 2016.01.07 |
Mysql Join Update. (0) | 2015.10.27 |
MySQL 커버링 인덱스 (0) | 2015.10.16 |
MySQL 설치 및 권한 관리. (0) | 2015.10.01 |