摘要:
select * from ShopOrder where datediff(week,ordTime,getdate()-1)=0 //查询当天日期在一周年的数据select * from ShopOrder where datediff(day,ordTime,getdate()-1)=0 //查询当天的所有数据--查询当天: select * from info where DateDiff(dd,datetime,getdate())=0 --查询24小时内的: select * from info where DateDiff(hh,datetime,getDate())=24 - 阅读全文