首页 > 数据库 > Oracle > sql之26 using sql*plus
行编辑命令
Command | Description |
A[PPEND] text | Adds text to the end of the current line |
C[HANGE] / old / new | Changes old text to new in the current line |
C[HANGE] / text / | Deletes text from the current line |
CL[EAR] BUFF[ER] | Deletes all lines from the SQL buffer |
DEL | Deletes current line |
DEL n | Deletes line n |
DEL m n | Deletes lines m to n inclusive |
I[NPUT] | Inserts an indefinite number of lines |
I[NPUT] text | Inserts a line consisting of text |
L[IST] | Lists all lines in the SQL buffer |
L[IST] n | Lists one line (specified by n) |
L[IST] m n | Lists a range of lines (m to n) inclusive |
R[UN] | Displays and runs the current SQL statement in the buffer |
n | Specifies the line to make the current line |
n text | Replaces line n with text |
0 text | Inserts a line before line 1 |
文件操作命令
Command | Description |
SAV[E] filename [.ext] [REP[LACE]APP[END]] | Saves current contents of SQL buffer to a file. Use APPEND to add to an existing file; use REPLACE to overwrite an existing file. The default extension is .sql. |
GET filename [.ext] | Writes the contents of a previously saved file to the SQL buffer. The default extension for the filename is .sql. |
STA[RT] filename [.ext] | Runs a previously saved command file. |
@ filename | Runs a previously saved command file (same as START). |
ED[IT] | Invokes the editor and saves the buffer contents to a file named afiedt.buf. |
ED[IT] [filename[.ext]] | Invokes the editor to edit contents of a saved file. |
SPO[OL][filename[.ext]|OFF|OUT] | Stores query results in a file. OFF closes the spool file. OUT closes the spool file and sends the file results to the system printer. |
EXIT | Leaves SQL*Plus. |
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/271063/viewspace-910179/ ,如需转载,请注明出处,否则将追究法律责任。