日期:2014-05-17 浏览次数:21001 次
select rownum rn, t.* from test_yixl t; select * from (select rownum rn, t.* from test_yixl t) aa where mod(aa.rn,2) = 0;
------解决方案--------------------
http://blog.sina.com.cn/s/blog_5892bb180100vjo2.html
------解决方案--------------------
实测数据:
CREATE TABLE T35 ( State VARCHAR2(2), CreateTime DATE ); INSERT INTO T35 VALUES('0', to_date('2011-12-09 01:00:00', 'YYYY-MM-DD HH24:MI:SS')); INSERT INTO T35 VALUES('0', to_date('2011-12-09 02:00:00', 'YYYY-MM-DD HH24:MI:SS')); INSERT INTO T35 VALUES('0', to_date('2011-12-09 03:00:00', 'YYYY-MM-DD HH24:MI:SS')); INSERT INTO T35 VALUES('0', to_date('2011-12-09 04:00:00', 'YYYY-MM-DD HH24:MI:SS')); INSERT INTO T35 VALUES('0', to_date('2011-12-09 05:00:00', 'YYYY-MM-DD HH24:MI:SS')); INSERT INTO T35 VALUES('0', to_date('2011-12-09 06:00:00', 'YYYY-MM-DD HH24:MI:SS'));