把下面“表名”换成本地真实的表名即可:
SELECT
DATE_FORMAT(
ADDDATE(
'2017-06-01',
INTERVAL @d DAY
),
'%Y-%m-%d'
) AS date ,@d :=@d + 1 day
FROM
表名,
(SELECT @d := 0) temp
WHERE
ADDDATE(
'2017-06-01',
INTERVAL @d DAY
) <= DATE_FORMAT('2017-06-05', '%Y-%m-%d')
ORDER BY
day;
结果如图: