当前位置: 代码迷 >> Sql Server >> 日期字段的记录查找。该怎么处理
  详细解决方案

日期字段的记录查找。该怎么处理

热度:59   发布时间:2016-04-27 21:18:43.0
日期字段的记录查找。
表中有两个字段,start_time   ,   end_time
分别代表开始时间和结束时间。
我有如下记录:
1982-10-11       1983-01-10
1984-01-01       1984-02-01
......

我如果日子是:1982-11-11   也就是说1982年至1983间的记录。
我怎么列出来?

------解决方案--------------------
select * from 表
where '1982-11-11 ' between start_time and end_time
------解决方案--------------------
這個意思?


Select * From TableName
Where '1982-11-11 ' Between start_time And end_time
  相关解决方案