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命令,或者是在執行命令過程中鍵入的分號(;)和斜劃線(/).

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章