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缓冲,如果你随后键入其它命令,在缓冲中上一条命令将被替换。

sqlplus 空行 结束命令相关推荐

  1. Oracle sqlplus的set命令详细使用和设置

    Oracle sqlplus的set命令详细使用和设置 SQL*Plus是Oracle提供的访问数据库服务器的客户端软件,是Oracle的核心组件,也是Oracle DBA最常用的工具. 1.1  s ...

  2. oracle 导出空行,oracle sqlplus空行处理方法

    默认情况下,在sqlplus中运行的脚本,如包含空行,sqlplus会不认的,对sqlplus空行的出现,最常见的有两种形式,一种是sql语句中有空行,另一种是sql后有空行,如下: sqlplus运 ...

  3. oracle数据库基础:sqlplus与spool命令

    sqlplus命令 使用sqlplus登录之后,可以使用**buff(缓存)**来存储/执行/修改上一条运行的sql语句 . buff中只能存储一条sql语句,但是这条sql语句可能有很多行 每次放入 ...

  4. sqlplus 远程连接数据库命令

    sqlplus 远程连接命令 sqlplus 用户名/密码@数据库ip:1521/实例名

  5. 事物的开始和结束命令分别是什么_AutoCAD小秘密065:LOFT命令,创建天圆地方

    小时候住在上海的老式弄堂房子,在屋檐的旁边,有一根横的方形雨水管,有一根垂直的圆管,这两根管子连接的地方是一个上开口的正方形,下开口是圆形的薄铁皮接头,差不多就是以下图形的样子,这种对象我们一般俗称& ...

  6. 在sqlplus中实现命令的上翻下翻功能

    文章目录 1.安装rlwrap软件包 2.设置指令的别名 3.获取视频教程 4.版权声明 在Oracle的sqlplus中,使用SQL语句不太方便,sqlplus没有提供类似于shell中命令上翻下翻 ...

  7. SUSE下给SQLPLUS增加历史命令功能

    1.首先需要下载这两个包 下载 rlwrap-0.36.tar.gz http://utopia.knoware.nl/~hlub/rlwrap/readline-6.1.tar.gz http:// ...

  8. 事物的开始和结束命令分别是什么_什么是事务事务中的提交和回滚是什么意思...

    展开全部 1.事务就是指准备要做的或e5a48de588b662616964757a686964616f31333431356631所做的事情,在计算机语言中是指访问并可能更新数据库中各种数据项的一个 ...

  9. 事物的开始和结束命令分别是什么_人教版小学四年级语文下册期末测试题及答案[1]...

    班级姓名 一.我会读拼音,规范地写词语.(8分) wān yán xī shēng ā yí jiàn kāng ( ) ( ) ( ) () yúchǔn shàn kuǎn lǐcǎi jìng ...

最新文章

  1. COM组件开发实践(八)---多线程ActiveX控件和自动调整ActiveX控件大小(下)
  2. MD5在线查询的实现
  3. Spring Boot 整合 Swagger
  4. oracle测试没响应,Oracle JDBC 没响应,是不是BUG?
  5. .Netcore 2.0 Ocelot Api网关教程(6)- 配置管理
  6. golang获取程序运行路径
  7. 【HTML】表单练习
  8. 评论:我们该如何应对科技发展带来的失业
  9. 哪些模块可用于python性能分析_python性能分析之cProfile模块
  10. openim php sdk,imsdk_restapi-php-sdk
  11. 正负样本不平衡处理方法总结【转】
  12. STM32F103RBT6移植到STM32F103C8T6注意事项
  13. 关于静态博客的评论系统
  14. android 广播监听截屏,Android 应用监听截屏操作
  15. 高考前最后一天,AI 监考老师已就位
  16. IE8兼容html5视频播放
  17. c++ PDFium pdf转为图片
  18. Gmail被逐出中国客户端也不能收邮件肿么破?
  19. 这样的跳槽理由,会遭HR嫌弃!
  20. 【Windows无法修复问题】“启动修复”无法修复你的电脑解决方法

热门文章

  1. 初探生物信息数据库——生信原理第一次实验报告(华农)
  2. 分类器MNIST交叉验证准确率、混淆矩阵、精度和召回率(PR曲线)、ROC曲线、多类别分类器、多标签分类、多输出分类
  3. Unity2022新手入门教程(P4-P34)
  4. 形容计算机老师风采的句子,形容老师讲课好的句子,赞美讲课讲得好的句子,形容讲课讲得好的句子...
  5. GEE学习笔记 八十三:【GEE之Python版教程十三】几何图形
  6. MFC菜单、工具栏和状态栏
  7. 骁龙870和麒麟810哪个好 骁龙870和麒麟810哪个值得入手
  8. lol无法启动计算机丢失,无法开启游戏相关问题
  9. 英雄联盟一打开就提示版本服务器关闭链接,是否启用修复程序经行修复,英雄联盟停止运行_LOL启动游戏提示~league of legends已停止工作是什......
  10. 助理产品经理、产品经理、资深产品经理有什么区别?