Spool報表小結

來源:互聯網
上載者:User

 
Spool報表
解釋:
set colsep' ';     //域輸出分隔字元
set echo off;    //顯示start啟動的指令碼中的每個sql命令,預設為on
set feedback off;  //回顯本次sql命令處理的記錄條數,預設為on
set heading off;   //輸出域標題,預設為on
set pagesize 0;   //輸出每頁行數,預設為24,為了避免分頁,可設定為0。
set termout off;   //顯示指令碼中的命令的執行結果,預設為on
set trimout on;   //去除標準輸出每行的拖尾空格,預設為off
set trimspool on;  //去除複位向(spool)輸出每行的拖尾空格,預設為off
比較熟悉使用Oracle的人一般都會用spool命令來產生OS下的文字檔.
 例如我們把scott.dept表產生文字檔的語句寫成dept.sql,內容如下:
如:
set pages 50000;
set lines 200;   
set trims on;
set heading off;
spool  /Oracle_backup/log/test/dept.lst;
select deptno||','||dname||','||loc from scott.dept;
spool off;

find /opt/oias/h8/log/ -name /*.log  -mtime +7 |xargs -r rm -f

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.