후후 참고 바람~
SELECT a.date_ymd FROM (
SELECT CURDATE() - INTERVAL (a.a + (10 * b.a) + (100 * c.a)) DAY as date_ymd 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
) AS a
WHERE 1 = 1
AND a.date_ymd BETWEEN '2021-01-01 00:00:00' AND '2021-12-31 23:59:59'
ORDER BY a.date_ymd ASC
'기타' 카테고리의 다른 글
이클립스 자동정렬 막기 (0) | 2021.06.16 |
---|---|
이클립스 ( 전자정부프레임워크 ) 필수 플러그인 설치 및 사용법 - QuickSearch (0) | 2021.06.16 |
자바 JSON 형태로 JSP에 전송하기 ( java , json, jsp) (0) | 2021.06.15 |
자바(java) 차트관련 작업할때 좋은 사이트 ( 자바 차트 ) (0) | 2021.06.15 |
자바에서 Bybatis 쿼리가 갑자기 빈값이 나올때 ( null이 아닌) (0) | 2021.06.14 |
댓글