oracle use spool to write to text

来源:互联网 发布:php implode 爱好 编辑:程序博客网 时间:2024/05/16 09:25

最近用spool 导数据.

set linesize 9000
set serveroutput off;
set pagesize 10000;
set trimspool on;
set scan off;
set define off;
set echo on;

spool c:\TABLE.sql


SELECT  'SELECT '''||u.table_name||''', COUNT(1) AS RECORD_COUNT FROM '||u.table_name||';'
    FROM USER_TABLES u
--  where rownum <5
    ORDER BY u.TABLE_NAME;
   

set scan on;
set define on;
spool out;

 

linesize设置成多大最后导出来的记录有些还是给截掉了。

网上查了一下也没有什么好办法的,最后用控制台来导出,OK!!!!

 

原创粉丝点击