资料整理——SQLPLUS命令大全

自己整理的SQLPLUS命令大全

资料来源:SQPLUS Reference Guide 11.2

CommandDescription
@Runs SQL*Plus statements in the specified script. The script can be called from the local file system or from a web server.
@@Runs a script. This command is similar to the @ (at sign) command. It is useful for running nested scripts because it has the additional functionality of looking for the specified script in the same path as the calling script.
/(slash)Executes the SQL command or PL/SQL block.
ACCEPTReads a line of input and stores it in a given substitution variable.
APPENDAdds specified text to the end of the current line in the buffer.
ARCHIVE LOGDisplays information about redo log files.
ATTRIBUTESpecifies display characteristics for a given attribute of an Object Type column, and lists the current display characteristics for a single attribute or all attributes.
BREAKSpecifies where and how formatting will change in a report, or lists the current break definition.
BTITLEPlaces and formats a specified title at the bottom of each report page, or lists the current BTITLE definition.
CHANGEChanges text on the current line in the buffer.
CLEARResets or erases the current clause or setting for the specified option, such as BREAKS or COLUMNS.
COLUMNSpecifies display characteristics for a given column, or lists the current display characteristics for a single column or for all columns.
COMPUTECalculates and prints summary lines, using various standard computations, on subsets of selected rows, or lists all COMPUTE definitions.
CONNECTConnects a given user to Oracle Database.
COPYCopies results from a query to a table in the same or another database.
DEFINESpecifies a substitution variable and assigns it a CHAR value, or lists the value and variable type of a single variable or all variables.
DELDeletes one or more lines of the buffer.
DESCRIBELists the column definitions for the specified table, view, or synonym or the specifications for the specified function or procedure.
DISCONNECTCommits pending changes to the database and logs the current user off Oracle Database, but does not exit SQL*Plus.
EDITInvokes an operating system text editor on the contents of the specified file or on the contents of the buffer.
EXECUTEExecutes a single PL/SQL statement.
EXITTerminates SQL*Plus and returns control to the operating system.
GETLoads a operating system file into the buffer.
HELPAccesses the SQL*Plus command-line help system.
HOSTExecutes an operating system command without leaving SQL*Plus.
INPUTAdds one or more new lines after the current line in the buffer.
LISTLists one or more lines of the buffer.
PASSWORDEnables a password to be changed without echoing the password on an input device.
PAUSEDisplays the specified text, then waits for the user to press Return.
PRINTDisplays the current value of a bind variable.
PROMPTSends the specified message to the user's screen.
QUITTerminates SQL*Plus and returns control to the operating system. QUIT is identical to EXIT.
RECOVERPerforms media recovery on one or more tablespaces, one or more datafiles, or the entire database.
REMARKBegins a comment in a script.
REPFOOTERPlaces and formats a specified report footer at the bottom of each report, or lists the current REPFOOTER definition.
REPHEADERPlaces and formats a specified report header at the top of each report, or lists the current REPHEADER definition.
RUNLists and runs the SQL command or PL/SQL block currently stored in the buffer.
SAVESaves the contents of the buffer in an operating system file (a script).
SETSets a system variable to alter the SQL*Plus environment for your current session.
SHOWShows the value of a SQL*Plus system variable or the current SQL*Plus environment.
SHUTDOWNShuts down a currently running Oracle Database instance.
SPOOLStores query results in an operating system file and, optionally, sends the file to a printer.
STARTRuns the SQL*Plus statements in the specified script. The script can be called from the local file system or a web server in SQL*Plus command-line.
STARTUPStarts an Oracle Database instance and optionally mounts and opens a database.
STORESaves attributes of the current SQL*Plus environment in an operating system script.
TIMINGRecords timing data for an elapsed period of time, lists the current timer's title and timing data, or lists the number of active timers.
TTITLEPlaces and formats a specified title at the top of each report page, or lists the current TTITLE definition.
UNDEFINEDeletes one or more substitution variables that you defined either explicitly (with the DEFINE command) or implicitly (with an argument to the START command).
VARIABLEDeclares a bind variable that can be referenced in PL/SQL.
WHENEVER OSERRORExits SQL*Plus if an operating system command generates
WHENEVER SQLERRORExits SQL*Plus if a SQL command or PL/SQL block generates an error.
XQUERY Runs an XQuery 1.0 statement.

提示:

Adobe Acrobat Pro中点击右键,选择“Copy with Formatting”,可保留表格格式,否则格式错乱,难以整理。 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值