在oracle中如何实现查询某一时间段的数据?

如题所述

select * from tab where dtcol between to_date('2012-05-01 00:00:00','yyyy-mm-dd hh24:mi:ss') and to_date('2012-05-31 00:00:00','yyyy-mm-dd hh24:mi:ss')
温馨提示:答案为网友推荐,仅供参考
第1个回答  2017-07-10
根据时间范围查询就好了,比如:
select * from a where a.create_date between to_date('20170101','yyyy/mm/dd') and to_date('20170531','yyyy/mm/dd')本回答被网友采纳
第2个回答  2018-06-13
select * from tb_policy
as of timestamp to_timestamp('20160112 10:00:00', 'yyyymmdd HH:mi:ss') where (status=5 or status=6) and prod_no='2026';
第3个回答  2017-07-05
某个时间段?
请采纳。。。。
第4个回答  2012-06-25
select * from table where column between date1 and date2