select * from 表名 where term between convert(char(10),getdate(),120)
and convert(char(10),dateadd(month,3,getdate()),120)

解决方案 »

  1.   

    select * from tb1_1 where datediff(month,term,getdate())>=3
      

  2.   

    上面的应该理解错了,楼主的意思是0~90天,还是0~3个月?如果是前者,用:
    select * from tb1_1 where datediff(day,term,getdate()) between 0 and 90后者,用:
    select * from tb1_1 where datediff(month,term,getdate()) between 0 and 3
      

  3.   

    zjcxc(邹建) 的并不太正确吧
    例如1月29到4月1日也会返回3,而实际上还没有到三个月
      

  4.   

    zjcxc(邹建)写的真快,果然是高手*_*(太崇拜了)