【轉】SET SERVEROUTPUT
設定 oracle sqlplus DBMS_OUTPUT.put_line
SET SERVEROUT[PUT] {ON | OFF}
[SIZE {n | UNL[IMITED]}]
[FOR[MAT] {WRA[PPED] | WOR[D_WRAPPED] | TRU[NCATED]}]
1 設定DBMS_OUTPUT.put_line輸出顯示
SET SERVEROUTPUT ON
2 關閉DBMS_OUTPUT.put_line輸出顯示
SET SERVEROUTPUT OFF
3 設定DBMS_OUTPUT緩衝區大小
SET SERVEROUTPUT ON SIZE number(1000)
4 設定格式TRUNCATED: format 設定這個格式以後oracle會根據set linesize 的長度切斷而不再顯示
SCOTT>SET SERVEROUTPUT ON FORMAT TRUNCATED;
SCOTT>SET LINESIZE 10;
SCOTT>BEGIN
2 DBMS_OUTPUT.PUT_LINE('123 456 789 ABC');
3 END;
4 /
123 456 78
PL/SQL procedure successfully completed.
5 設定格式WRAPPED 這個會預設以set linesize 為分割切斷以後在新的一行顯示
SCOTT>SET SERVEROUTPUT ON FORMAT WRAPPED
SCOTT>SET LINESIZE 10;
SCOTT>BEGIN
2 DBMS_OUTPUT.PUT_LINE('123 456 789 ABC');
3 END;
4 /
123 456 78
9 ABC
PL/SQL procedure successfully completed.
6 設定格式WORD_WRAPPED 行的分割以單詞為分割,預設從左到右跳過空格,每行不超過set linesize
SCOTT>SET SERVEROUTPUT ON FORMAT WORD_WRAPPED;
SCOTT>SET LINESIZE 10;
SCOTT>BEGIN
2 DBMS_OUTPUT.PUT_LINE('123 456 789 ABC');
3 END;
4 /
123 456
789 ABC
PL/SQL procedure successfully completed.
SET SERVEROUT[PUT] {ON | OFF}
[SIZE {n | UNL[IMITED]}]
[FOR[MAT] {WRA[PPED] | WOR[D_WRAPPED] | TRU[NCATED]}]
1 設定DBMS_OUTPUT.put_line輸出顯示
SET SERVEROUTPUT ON
2 關閉DBMS_OUTPUT.put_line輸出顯示
SET SERVEROUTPUT OFF
3 設定DBMS_OUTPUT緩衝區大小
SET SERVEROUTPUT ON SIZE number(1000)
4 設定格式TRUNCATED: format 設定這個格式以後oracle會根據set linesize 的長度切斷而不再顯示
SCOTT>SET SERVEROUTPUT ON FORMAT TRUNCATED;
SCOTT>SET LINESIZE 10;
SCOTT>BEGIN
2 DBMS_OUTPUT.PUT_LINE('123 456 789 ABC');
3 END;
4 /
123 456 78
PL/SQL procedure successfully completed.
5 設定格式WRAPPED 這個會預設以set linesize 為分割切斷以後在新的一行顯示
SCOTT>SET SERVEROUTPUT ON FORMAT WRAPPED
SCOTT>SET LINESIZE 10;
SCOTT>BEGIN
2 DBMS_OUTPUT.PUT_LINE('123 456 789 ABC');
3 END;
4 /
123 456 78
9 ABC
PL/SQL procedure successfully completed.
6 設定格式WORD_WRAPPED 行的分割以單詞為分割,預設從左到右跳過空格,每行不超過set linesize
SCOTT>SET SERVEROUTPUT ON FORMAT WORD_WRAPPED;
SCOTT>SET LINESIZE 10;
SCOTT>BEGIN
2 DBMS_OUTPUT.PUT_LINE('123 456 789 ABC');
3 END;
4 /
123 456
789 ABC
PL/SQL procedure successfully completed.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26892340/viewspace-721937/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【轉】SET SERVEROUTPUT ONServer
- set serveroutput on 在PL/SQL中輸出內容ServerSQL
- 【SQL/PLUS】Oracle PL/SQL程式設計用set serveroutput onSQLOracle程式設計Server
- serveroutput size不夠用Server
- 【Oracle】-【sqlplus相關】-serveroutput引數OracleSQLServer
- [20171211]dbms_output無serveroutput onServer
- shell中set命令詳解(轉)
- BASH shell set命令詳解(轉)
- sqlplus常用set指令(轉)SQL
- 【轉】修改Oracle字符集(character set)Oracle
- 轉:ArrayList:用Set代替containsAI
- List ,Set,Map集合與陣列互轉陣列
- MySQL TEXT、DATE、SET 資料型別(轉)MySql資料型別
- java中list、set和map 的區別(轉)Java
- Set
- set /?
- set uid ,set gid,sticky bit的三個許可權的詳細說明(轉)UI
- alter system set events相關知識(轉帖2)
- alter system set events相關知識(轉帖1)
- lombok get/set 與 JavaBean get/setLombokJavaBean
- 求set uid ,set gid,sticky bit的三個許可權的詳細說明(轉)UI
- oracle配置會話環境(set命令) -- 轉自網路Oracle會話
- SET NEWNAME FOR
- set -e
- Jet Set
- Vue.set與vue.$set的使用Vue
- set pause on,set pagesize N小知識點。
- [Javascript] Perform Set Operations using JavaScript Set MethodsJavaScriptORM
- Java中 set,list,array(集合與陣列)、Map相互轉換Java陣列
- alter system set event和set events的區別
- Redis 入門 - 3(集合 set、有序集合 sort set)Redis
- JavaScript Set物件JavaScript物件
- Set delete() 方法delete
- RMAN SET NEWNAME
- oracle set eventsOracle
- alter session setSession
- oracle set roleOracle
- set excel formatExcelORM