SELECT DISTINCT
	date_format(
		DATE_ADD(
			'2018-08-20',
			INTERVAL id DAY
		),
		'%Y-%m-%d'
	) AS `TIME`
FROM
	sys_log
WHERE
	DATE_ADD(
		'2018-08-20',
		INTERVAL id DAY
	) <= '2018-08-26'
ORDER BY time

表名为任意表,数量够多即可

Logo

更多推荐