使用pl/sql工具 select * from table 其记录数大于65535,由于excel中单sheet最大记录数只有65535,我是手工选择粘贴的,这样很麻烦。
请问有没有什么好方法可以实现excel中自动分sheet,或者利用select的条件限定,第一次返回前6万条记录,第二次返回60001到120000条,....
谢谢各位大虾了。
请问有没有什么好方法可以实现excel中自动分sheet,或者利用select的条件限定,第一次返回前6万条记录,第二次返回60001到120000条,....
谢谢各位大虾了。
--参考一下:
SQL> select * from tab;A B
-------- ----------
0121 60.00
012101 70.00
0122 110.00
0124 230.00
012303 45.00
0123 80.006 rows selectedSQL> select * from ( select rownum rn,tab.* from tab ) t where t.rn<=2; RN A B
---------- -------- ----------
1 0121 60.00
2 012101 70.00SQL> select * from ( select rownum rn,tab.* from tab ) t where t.rn>2 and t.rn<=4; RN A B
---------- -------- ----------
3 0122 110.00
4 0124 230.00SQL> select * from ( select rownum rn,tab.* from tab ) t where t.rn>4 and t.rn<=6; RN A B
---------- -------- ----------
5 012303 45.00
6 0123 80.00SQL>
例:select * from(select t.*,rownum rn from tableName t) where rn<100
select * from(select t.*,rownum rn from tableName t) where rn between 100 and 200;
select * from(select t.*,rownum rn from tableName t) where rn>200