查询表中昨天和今天的数据

select * from tbOutData where datediff(day,datCashTime,getdate())
between datediff(day,(getdate()-1),getdate()) and datediff(day,getdate(),getdate())

作者:江宁织造
博客:http://www.cnblogs.com/wgx0428/
原文地址:https://www.cnblogs.com/wgx0428/p/2403248.html