摘要:
使用sql语句查询日期在一周内的数据select * from ShopOrder where datediff(week,ordTime,getdate()-1)=0 //查询当天日期在一周年的数据select * from ShopOrder where datediff(day,ordTime,getdate()-1)=0 //查询当天的所有数据SELECT * FROM A where datediff(d,datetime,getdate()) <=30 //前30天 SELECT * FROM A WHERE DATEDIFF(m, shijian, GETDATE()) & 阅读全文