Sqlplus联机文档学习-Sqlplus运行的3种命令和SQL缓冲的功能!

Sqlplus联机文档学习

地址:http://download.oracle.com/docs/cd/E11882_01/server.112/e16604/ch_four.htm#i1039255

[原文] SQL*Plus Basics

This chapter helps you learn the basics of using SQL*Plus. It has the following topics:

  • Entering and Executing Commands

[译文]

Sqlplus基础

这部分章节可以帮助你学习如何使用Sqlplus,包括下列部分:

  • 键入和执行命令

[原文]

Entering and Executing Commands

Unless stated otherwise, descriptions of commands are applicable to all user interfaces.

In the command-line, type commands at the SQL*Plus prompt and press Return to execute them.

Usually, you separate the words in a command with a space or a tab. You can use additional spaces or tabs between words to make your commands more readable.

Case sensitivity is operating system specific. For the sake of clarity, all table names, column names, and commands in this guide appear in capital letters.

You can enter three kinds of commands:

  • SQL commands, for working with information in the database

  • PL/SQL blocks, also for working with information in the database

  • SQL*Plus commands, for formatting query results, setting options, and editing and storing SQL commands and PL/SQL blocks

The manner in which you continue a command on additional lines, end a command, or execute a command differs depending on the type of command you wish to enter and run.

[译文]

键入和执行命令

除非规定的,否则描述的命令在用户的接口是可以应用的;

在命令行下,在Sqlplus提示符下键入命令,然后按回车键执行命令.

通常情况下,你需要用空格各Tab键分隔关键字.你也可以附加一个空格或Tab键来使你的命令更可读.

操作系统特殊的规定是敏感的情况,为了更清晰的阐述:在指南中显示的所有表名,列名和命令都是用大写字母来标识的.

你可以键入下列3种命令:

  • SQL命令,对数据库进行相关操作;
  • PL/SQL块命令,也是对数据库进行相关操作;
  • Sqlplus命令,用来显示查询结果的格式,设置选项,编辑和存储SQL命令和PL/SQL块命令.

你键入命令的方式是附加一行还是结束命令,取决你你希望键入或执行命令.

[原文]

The SQL Buffer

The SQL buffer stores the most recently entered SQL command or PL/SQL block (but not SQL*Plus commands). The command or block remains in the buffer until replaced by the next SQL command or PL/SQL block. You can view the buffer contents with the LIST command.

You can execute the command or block in the SQL buffer using the RUN or /(slash) commands. RUN displays the command or block in the buffer before executing it. /(slash) executes the command or block in the buffer without displaying it first.

SQL*Plus does not store SQL*Plus commands, or the semicolon or slash characters you type to execute a command in the SQL buffer.

[译文]

SQL缓冲

SQL缓冲区中存储的的最近输入的SQL命令或PL/SQL块命令,(不是Sqlplus命令)这些命令或块命令被保存在缓冲中直到你键入下一条命令或PL/SQL块命令把他们替换掉.你可以使用LIST命令查看缓冲中的命令.

可以使用RUN或/执行缓冲中的命令,RUN命令在执行前显示缓冲中的命令,而/在第一次执行时不显示.

注:Sqlplus不能存储 Sqlplus命令,或者是在执行命令过程中键入的分号(;)和斜划线(/).

你可能感兴趣的:(数据库,职场,休闲,blank)