form t in table(表)
where t.datetime(字段名)>=[时间] and t.datetime<=[时间]
select t;
SQL:
(1) select * from tablename where datefield between to_date('2011-07-01 00:00:00','yyyy-mm-dd hh24:mi:ss') and to_date('2011-09-01 00:00:00','yyyy-mm-dd hh24:mi:ss');
(2) select * from tablename where to_char(datefield, 'mm') in ('07', '08');