日期:2014-05-18 浏览次数:20457 次
select * from tab where datediff(m,[date],getdate())<=2
------解决方案--------------------
select * from Table where [date] >= DATEADD (MONTH ,-2,GETDATE())
------解决方案--------------------
---第一种方法 select * from tb where date between 2011-11-30 00:02:00.000 and 2012-01-31 00:02:00.000 --第二种方法 select * from tb where datediff(mm,date,gedate()=2