码迷,mamicode.com
首页 > 其他好文 > 详细

查询两个时间段间隔多久的数据

时间:2018-07-10 14:50:27      阅读:151      评论:0      收藏:0      [点我收藏+]

标签:sele   str   from   key   containe   keyword   div   diff   时间   

select from tbname where datediff(dd,‘2008-03-20‘,getdate())>30   天
select from tbname where datediff(mm,‘2008-04-20‘,getdate())>0   月

查询两个时间段间隔多久的数据

标签:sele   str   from   key   containe   keyword   div   diff   时间   

原文地址:https://www.cnblogs.com/zpbk/p/9288570.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!