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')
根据时间范围查询就好了,比如:
select * from a where a.create_date between to_date('20170101','yyyy/mm/dd') and to_date('20170531','yyyy/mm/dd')
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';
某个时间段?
请采纳。。。。
select * from table where column between date1 and date2