sqlplus的幫助資訊

byfree發表於2008-06-16

在一個文件中看到如何顯示sqlplus的幫助資訊,具體操作如下:

SQL> ? index

Enter Help [topic] for help.

 @             COPY         PAUSE                    SHUTDOWN
 @@            DEFINE       PRINT                    SPOOL
 /             DEL          PROMPT                   SQLPLUS
 ACCEPT        DESCRIBE     QUIT                     START
 APPEND        DISCONNECT   RECOVER                  STARTUP
 ARCHIVE LOG   EDIT         REMARK                   STORE
 ATTRIBUTE     EXECUTE      REPFOOTER                TIMING
 BREAK         EXIT         REPHEADER                TTITLE
 BTITLE        GET          RESERVED WORDS (SQL)     UNDEFINE
 CHANGE        HELP         RESERVED WORDS (PL/SQL)  VARIABLE
 CLEAR         HOST         RUN                      WHENEVER OSERROR
 COLUMN        INPUT        SAVE                     WHENEVER SQLERROR
 COMPUTE       LIST         SET
 CONNECT       PASSWORD     SHOW

這裡列出了所有的sqlplus命令,如要顯示某個命令的用法和說明,用?+命令名(有點像網路裝置的幫助,反的)

SQL> ? set

 SET
 ---

 Sets a system variable to alter the SQL*Plus environment settings
 for your current session. For example, to:
     -   set the display width for data
     -   customize HTML formatting
     -   enable or disable printing of column headings
     -   set the number of lines per page
 In iSQL*Plus, you can also use the Preferences screen to set
 system variables.

 SET system_variable value

 where system_variable and value represent one of the following clauses:

   APPI[NFO]{OFF|ON|text}                   NUM[WIDTH] {10|n}
   ARRAY[SIZE] {15|n}                       PAGES[IZE] {14|n}
   AUTO[COMMIT] {OFF|ON|IMM[EDIATE]|n}      PAU[SE] {OFF|ON|text}
   AUTOP[RINT] {OFF|ON}                     RECSEP {WR[APPED]|EA[CH]|OFF}
   AUTORECOVERY {OFF|ON}                    RECSEPCHAR {_|c}
   AUTOT[RACE] {OFF|ON|TRACE[ONLY]}         SERVEROUT[PUT] {ON|OFF}
     [EXP[LAIN]] [STAT[ISTICS]]               [SIZE {n | UNLIMITED}] [FOR[MAT]
   BLO[CKTERMINATOR] {.|c|ON|OFF}             {WRA[PPED] |
   CMDS[EP] {;|c|OFF|ON}                       WOR[D_WRAPPED] |
   COLSEP {_|text}                             TRU[NCATED]}]
   CON[CAT] {.|c|ON|OFF}                   *SHIFT[INOUT] {VIS[IBLE] |
   COPYC[OMMIT] {0|n}                         INV[ISIBLE]}
   COPYTYPECHECK {ON|OFF}                  *SHOW[MODE] {OFF|ON}
   DEF[INE] {&|c|ON|OFF}                   *SQLBL[ANKLINES] {OFF|ON}
   DESCRIBE [DEPTH {1|n|ALL}]               SQLC[ASE] {MIX[ED] |
     [LINENUM {OFF|ON}] [INDENT {OFF|ON}]     LO[WER] | UP[PER]}
   ECHO {OFF|ON}                           *SQLCO[NTINUE] {> | text}
  *EDITF[ILE] file_name[.ext]              *SQLN[UMBER] {ON|OFF}
   EMB[EDDED] {OFF|ON}                      SQLPLUSCOMPAT[IBILITY] {x.y[.z]}
   ESC[APE] {\|c|OFF|ON}                   *SQLPRE[FIX] {#|c}
   FEED[BACK] {6|n|ON|OFF}                 *SQLP[ROMPT] {SQL>|text}
   FLAGGER {OFF|ENTRY|INTERMED[IATE]|FULL}  SQLT[ERMINATOR] {;|c|ON|OFF}
  *FLU[SH] {ON|OFF}                        *SUF[FIX] {SQL|text}
   HEA[DING] {ON|OFF}                      *TAB {ON|OFF}
   HEADS[EP] {||c|ON|OFF}                  *TERM[OUT] {ON|OFF}
   INSTANCE [instance_path|LOCAL]          *TI[ME] {OFF|ON}
   LIN[ESIZE] {80|n} ({150|n} iSQL*Plus)    TIMI[NG] {OFF|ON}
   LOBOF[FSET] {1|n}                       *TRIM[OUT] {ON|OFF}
   LOGSOURCE [pathname]                    *TRIMS[POOL] {OFF|ON}
   LONG {80|n}                              UND[ERLINE] {-|c|ON|OFF}
   LONGC[HUNKSIZE] {80|n}                   VER[IFY] {ON|OFF}
   MARK[UP] HTML [OFF|ON]                   WRA[P] {ON|OFF}
     [HEAD text] [BODY text] [TABLE text]   XQUERY {BASEURI text|
     [ENTMAP {ON|OFF}]                        ORDERING{UNORDERED|
     [SPOOL {OFF|ON}]                                  ORDERED|DEFAULT}|
     [PRE[FORMAT] {OFF|ON}]                   NODE{BYVALUE|BYREFERENCE|
   NEWP[AGE] {1|n|NONE}                            DEFAULT}|
   NULL text                                  CONTEXT text}
   NUMF[ORMAT] format


 An asterisk (*) indicates the SET option is not supported in iSQL*Plus.

SQL> ? /

 / (slash)
 ---------

 Executes the most recently executed SQL command or PL/SQL block
 which is stored in the SQL buffer. Use slash (/) at the command
 prompt or line number prompt in SQL*Plus command line, or use
 slash (/) in the iSQL*Plus Workspace. The buffer has no command
 history and does not record SQL*Plus commands.

 /

有了這樣的幫助資訊,以後就不用記很多sqlplus命令了,不過記在腦子裡速度會快點,記憶體嘛!

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17997/viewspace-349388/,如需轉載,請註明出處,否則將追究法律責任。

相關文章