Sqlplus联机文档学习-如何结束一个SQL命令?
2010-12-24 12:01
555 查看
Sqlplus联机文档学习 地址:http://download.oracle.com/docs/cd/E11882_01/server.112/e16604/ch_four.htm#i1039255
[原文] Ending a SQL Command You can end a SQL command in one of three ways:
with a semicolon (;)
with a slash (/) on a line by itself
with a blank line
A semicolon (;) tells SQL*Plus that you want to run the command. Type the semicolon at the end of the last line of the command, as shown in Example 4-3, "Entering a SQL Command", and press Return or click Execute. SQL*Plus processes the command and also stores the command in the SQL buffer. See The SQL Buffer for details. If you mistakenly press Return before typing the semicolon, SQL*Plus prompts you with a line number for the next line of your command. Type the semicolon and press Return again or click Execute to run the command.
A slash (/) on a line by itself also tells SQL*Plus that you wish to run the command. Press Return at the end of the last line of the command. SQL*Plus prompts you with another line number. Type a slash and press Return again or click Execute. SQL*Plus executes the command and stores it in the buffer.
A blank line in a SQL statement or script tells SQL*Plus that you have finished entering the command, but do not want to run it yet. Press Return at the end of the last line of the command. SQL*Plus prompts you with another line number.
Note:
You can change the way blank lines appear and behave in SQL statements using the SET SQLBLANKLINES command. For more information about changing blank line behavior, see the SET command.
To execute commands this way, press Return again; SQL*Plus now prompts you with the SQL*Plus command prompt. SQL*Plus does not execute the command, but stores it in the SQL buffer. See The SQL Buffer for details. If you subsequently enter another SQL command, SQL*Plus overwrites the previous command in the buffer.
[译文]
结束SQL命令
你可以通过下面三种方式来结束SQL命令:
使用一个分号(;);
在单独一行使用一个斜划线(/);
使用一个空行;
键入分号就是告诉Sqlplus你将要执行命令,通常在命令最后一行的末尾;像例子中表示的那样:Sqlplus进程将SQL命令存储在SQL缓冲中,可以查看SQL细节。如果你在输入分号之前错误的按了回车键,Sqlplus将会提示你在下一行继续输入命令,直到你键入分号然后按回车键执行命令为止。
斜划线独自占一行的意思就是告诉Sqlplus你将要执行命令了。在命令的最后 一行按回车,Sqlplus提示你下一个行号,然后可以键入斜划线,然后按回车,则执行命令。Sqlplus将执行的命令存储在缓冲里。
空行在SQL语句或脚本中表示你想结束键入命令,但不执行。当你在命令的最后一行按回车键,Sqlplus提示你下一行号。
注意:
你可以通过使用命令SET SQLBLANKLINES来改变SQL语句显示空行的方式。相关更多请看SET命令。
通过这种方式执行命令,请再按回车一次,Sqlplus提示你当前在Sqlplus命令提示状态,Sqlplus不能执行命令,但命令存储在SQL缓冲中。可以查看SQL缓冲,如果你随后键入其它命令,在缓冲中上一条命令将被替换。
[原文] Ending a SQL Command You can end a SQL command in one of three ways:
with a semicolon (;)
with a slash (/) on a line by itself
with a blank line
A semicolon (;) tells SQL*Plus that you want to run the command. Type the semicolon at the end of the last line of the command, as shown in Example 4-3, "Entering a SQL Command", and press Return or click Execute. SQL*Plus processes the command and also stores the command in the SQL buffer. See The SQL Buffer for details. If you mistakenly press Return before typing the semicolon, SQL*Plus prompts you with a line number for the next line of your command. Type the semicolon and press Return again or click Execute to run the command.
A slash (/) on a line by itself also tells SQL*Plus that you wish to run the command. Press Return at the end of the last line of the command. SQL*Plus prompts you with another line number. Type a slash and press Return again or click Execute. SQL*Plus executes the command and stores it in the buffer.
A blank line in a SQL statement or script tells SQL*Plus that you have finished entering the command, but do not want to run it yet. Press Return at the end of the last line of the command. SQL*Plus prompts you with another line number.
Note:
You can change the way blank lines appear and behave in SQL statements using the SET SQLBLANKLINES command. For more information about changing blank line behavior, see the SET command.
To execute commands this way, press Return again; SQL*Plus now prompts you with the SQL*Plus command prompt. SQL*Plus does not execute the command, but stores it in the SQL buffer. See The SQL Buffer for details. If you subsequently enter another SQL command, SQL*Plus overwrites the previous command in the buffer.
[译文]
结束SQL命令
你可以通过下面三种方式来结束SQL命令:
使用一个分号(;);
在单独一行使用一个斜划线(/);
使用一个空行;
键入分号就是告诉Sqlplus你将要执行命令,通常在命令最后一行的末尾;像例子中表示的那样:Sqlplus进程将SQL命令存储在SQL缓冲中,可以查看SQL细节。如果你在输入分号之前错误的按了回车键,Sqlplus将会提示你在下一行继续输入命令,直到你键入分号然后按回车键执行命令为止。
斜划线独自占一行的意思就是告诉Sqlplus你将要执行命令了。在命令的最后 一行按回车,Sqlplus提示你下一个行号,然后可以键入斜划线,然后按回车,则执行命令。Sqlplus将执行的命令存储在缓冲里。
空行在SQL语句或脚本中表示你想结束键入命令,但不执行。当你在命令的最后一行按回车键,Sqlplus提示你下一行号。
注意:
你可以通过使用命令SET SQLBLANKLINES来改变SQL语句显示空行的方式。相关更多请看SET命令。
通过这种方式执行命令,请再按回车一次,Sqlplus提示你当前在Sqlplus命令提示状态,Sqlplus不能执行命令,但命令存储在SQL缓冲中。可以查看SQL缓冲,如果你随后键入其它命令,在缓冲中上一条命令将被替换。
相关文章推荐
- Sqlplus联机文档学习-Sqlplus运行的3种命令和SQL缓冲的功能!
- Sqlplus联机文档学习--执行PL/SQL块命令。
- Sqlplus联机文档学习
- Sql*plus 联机文档学习
- Sqlplus 联机文档学习
- Sqlplus联机文档学习
- telnet或SQLplus下命令输入错误如何删掉重新输入
- oracle10g 学习笔记---sql*plus常用命令1
- SQLServer如何用T—SQL命令查询一个数据库中有哪些表
- sqlplus 空行 结束命令
- 如何用sqlplus执行一个sql文件
- Linux学习笔记2:如何快速的学习使用一个命令
- oracle 学习之路,使用sql*plus编写交互命令
- 20130830sqlplus使用及联机文档
- SQLplus下命令输入错误如何删掉重新输入
- 在sql语句中,如何获取一个日期的周开始日期,周结束日期
- (他山之石)MFC学习之路(二)如何在多文档视图中,程序一开始运行,只出现主框架,不打开一个文档?
- SQLServer如何用T—SQL命令查询一个数据库中有哪些表
- SQL学习笔记[6] - SQL中如何将一个表中的某一列的数据复制到另一个表中的某一列里
- 如何用DOS命令结束一个进程