Oracle---控制SQL*Plus的環境和資料字典

來源:互聯網
上載者:User

控制SQL*Plus的環境和資料字典

1.        控制SQL*Plus的環境

a)        SET 環境變數 變數的值

b)       SHOW 環境變數 |  ALL

 

SQL> show all

appinfo 為 OFF 並且已設定為"SQL*Plus"

arraysize 15

autocommit OFF

autoprint OFF

autorecovery OFF

autotrace OFF

blockterminator "." (hex 2e)

btitle OFF 為下一條 SELECT 語句的前幾個字元

cmdsep OFF

colsep " "

compatibility version NATIVE

concat "." (hex 2e)

copycommit 0

COPYTYPECHECK 為 ON

define "&" (hex 26)

describe DEPTH 1 LINENUM OFF INDENT ON

echo OFF

editfile "afiedt.buf"

embedded OFF

escape OFF

用於 6 或更多行的 FEEDBACK ON

flagger OFF

flush ON

heading ON

headsep "|" (hex 7c)

instance "local"

linesize 80

lno 8

loboffset 1

logsource ""

long 80

longchunksize 80

markup HTML OFF HEAD "<style type='text/css'> body {fo

newpage 1

null ""

numformat ""

numwidth 10

pagesize 14

PAUSE 為 OFF

pno 2

recsep WRAP

recsepchar " " (hex 20)

release 1002000100

repfooter OFF  為 NULL

repheader OFF  為 NULL

serveroutput OFF

shiftinout INVISIBLE

showmode OFF

spool OFF

sqlblanklines OFF

sqlcase MIXED

sqlcode 0

sqlcontinue "> "

sqlnumber ON

sqlpluscompatibility 10.2.0

sqlprefix "#" (hex 23)

sqlprompt "SQL> "

sqlterminator ";" (hex 3b)

suffix "sql"

tab ON

termout ON

timing OFF

trimout ON

trimspool OFF

ttitle OFF 為下一條 SELECT 語句的前幾個字元

underline "-" (hex 2d)

USER 為"SCOTT"

verify ON

wrap : 將換至下一行

2.        SQL*Plus的環境變數ECHO

將ECHO設定為ON 的時候,運行指令碼的時候不但返回啟動並執行結果,而且還返回命令。

SQL> show echo

echo OFF

SQL> set echo on

SQL> show echo

echo ON

SQL> select * from dept;

 

    DEPTNO DNAME          LOC

---------- -------------- -------------

        10 ACCOUNTING     NEW YORK

        20 RESEARCH       DALLAS

        30 SALES          CHICAGO

        40 OPERATIONS     BOSTON

SQL> save "D:\s";

已建立 file D:\s.sql

SQL> @D:\s.sql

SQL> select * from dept

  2  /

 

    DEPTNODNAME          LOC

---------- -------------- -------------

        10ACCOUNTING     NEW YORK

        20RESEARCH       DALLAS

        30SALES          CHICAGO

        40OPERATIONS     BOSTON

       3.    SET FEEDBACK n 表示當查詢選擇了至少6條記錄時,顯示返回的記錄數;但是如果查詢選擇的記錄數少於6條,就不顯示返回的記錄數。

       4.    以REM開始的語句為注釋。

       5.    USER_* ALL_*   DBA_* 

相關文章

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.