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

2024-11-13 05:30:32
推荐回答(5个)
回答1:

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')

回答2:

根据时间范围查询就好了,比如:
select * from a where a.create_date between to_date('20170101','yyyy/mm/dd') and to_date('20170531','yyyy/mm/dd')

回答3:

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';

回答4:

某个时间段?
请采纳。。。。

回答5:

select * from table where column between date1 and date2