Created
July 7, 2017 06:26
-
-
Save rdlabo/6a939c9b20e12008fa481e28d930bbb2 to your computer and use it in GitHub Desktop.
過去365日の日付をカルムで表示(サブクエリ等にお使い下さい)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
DATE_FORMAT(DATE_ADD(NOW(), INTERVAL @i := @i - 1 DAY),'%Y-%m-%d') create_date | |
FROM `information_schema`.COLUMNS,(SELECT @i:=0) s | |
LIMIT 365 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment