日期的比较问题 select * from 表名 where term between convert(char(10),getdate(),120)and convert(char(10),dateadd(month,3,getdate()),120) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from tb1_1 where datediff(month,term,getdate())>=3 上面的应该理解错了,楼主的意思是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 zjcxc(邹建) 的并不太正确吧例如1月29到4月1日也会返回3,而实际上还没有到三个月 zjcxc(邹建)写的真快,果然是高手*_*(太崇拜了) MSSQL 2008中如何实现to_char功能 mssql数据恢复不能恢复,请教原因 PowerDesinger中有些問題請教(謝謝) 有没有一个工具比sql delta4好的 SQL SERVER 2000的数据库被人恶意修改 数据库同步 ms-sql 预警信息(欢迎加入) 关于数据库登录不上的问题 我的数据丢失了一条,为什么? 用户关闭浏览器怎么实时监控用户在线状态 在线等…… 請教SQL版的老鳥們~~~~~~~~~~~~~~~~~~~~~~~~!!!!!!!!!!!!!!!!!!!!!!!!!!
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
例如1月29到4月1日也会返回3,而实际上还没有到三个月