-- select * from news_xyh_praise WHERE year(create_time) = year(curdate( ))
-- select * from news_xyh_praise WHERE quarter(create_time)= quarter( curdate( )) and year(create_time) = year(curdate( ))
-- select * from news_xyh_praise WHERE month(create_time)=month(curdate( )) and year(create_time) = year(curdate())
-- select * from news_xyh_praise where month(create_time) = month(curdate()) and week(create_time) = week(curdate())
本文介绍如何使用SQL查询按年、季度、月和周筛选特定时间范围内的数据,通过实例演示了精确的时间过滤方法。
2829

被折叠的 条评论
为什么被折叠?



