SELECT date_sub( curdate( ), INTERVAL 7 DAY ) AS a UNION SELECT date_sub( curdate( ), INTERVAL
SELECT
date_sub( curdate( ), INTERVAL 7 DAY ) AS a UNION
SELECT
date_sub( curdate( ), INTERVAL 6 DAY ) AS a UNioN
SELECT
date_sub( curdate( ), INTERVAL 5 DAY ) AS a UNION
SELECT
date_sub( curdate( ), INTERVAL 4 DAY ) AS a UNION
SELECT
date_sub( curdate( ), INTERVAL 3 DAY ) AS a UNION
SELECT
date_sub( curdate( ), INTERVAL 2 DAY ) AS a UNION
SELECT
date_sub( curdate( ), INTERVAL 1 DAY ) AS a
FROM DUAL
往前推几天或者几年
来源地址:https://blog.csdn.net/qq_37889636/article/details/131123045
--结束END--
本文标题: mysql获取近7天日期
本文链接: https://lsjlt.com/news/404070.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-10-23
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0