两种方法
两种情况:
1:查询给定时间在开始时间列与结束时间列范围中数据;
2:查询日期列在开始时间列与结束时间列范围中数据;
第一种:<,>, <= , >=
select * from 表名 where 日期列 >= to_date('2015-10-20 00:00:00','yyyy-mm-dd hh24:mi:ss') and t.日期列 <= to_date('2015-10-20 23:59:59','yyyy-mm-dd hh24:mi:ss')
第二种 between and
select * from 表名 where 日期列 between to_date('2015-10-20 00:00:00','yyyy-mm-dd hh24:mi:ss')and to_date('2015-10-20 23:59:59','yyyy-mm-dd hh24:mi:ss')