sql语句查询某一天数据
--如果还有今天以后的数据
--一周内呢
SELECT * FROM TB WHERE datediff(dd,DATE_TIME,getdate()) between 0 and 7
--从现在起往前算24小时内的呢?
SELECT * FROM TB WHERE datediff(hh,DATE_TIME,getdate()) between 0 and 23
"唯有高屋建瓴,方可水到渠成"
--如果还有今天以后的数据
--一周内呢
SELECT * FROM TB WHERE datediff(dd,DATE_TIME,getdate()) between 0 and 7
--从现在起往前算24小时内的呢?
SELECT * FROM TB WHERE datediff(hh,DATE_TIME,getdate()) between 0 and 23