oracle中查询两年之间某一个月的数据;
1.SELECT * from table where to_char(datetime,'YYYY-MM') in ('2013-06','2014-06','2015-06');
2.SELECT * from table where to_char(datetime.SPT,'YYYY') >= '2011' and to_char(datetime,'YYYY') <= '2015' and to_char(datetime,'MM')='06'
3.SELECT * from table where EXTRACT(YEAR FROM datetime) >= '2011' and EXTRACT(YEAR FROM datetime) <= '2015' and EXTRACT(MONTH FROM datetime)='06'