Oracle数据库日期范围查询有两种方式:to_char方式和to_date方式。
to_date方式:
select * from tablename where time>=
to_date('2011-05-02','yyyy-mm-dd')
and time<=to_date('2011-05-30','yyyy-mm-dd')
to_char方式:
select * from tablename where to_char(time,'yyyy-mm-dd')>='2011-05-02'
and to_char(time,'yyyy-mm-dd')<='2011-05-30'