没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
•
Tabl e o f
Contents
• Index
• Reviews
•
Reader
Reviews
• Errata
Oracle SQL*Plus Pocket Reference, 2nd Edition
By Jonathan Gennick
Publisher : O'Reilly
Pub Date : October 2002
ISBN : 0-596-00441-9
Pages : 120
Copyright
Oracle SQL*PlusPocket Reference
Section 1.1. Introduction
Section 1.2. Interacting with SQL*Plus
Section 1.3. Selecting Data
Section 1.4. Inserting Data
Section 1.5. Updating Data
Section 1.6. Deleting Data
Section 1.7. Merging Data (Oracle9i)
Section 1.8. Transaction Management
Section 1.9. Formatting Text Reports
Section 1.10. Tuning SQL
Section 1.11. SQL*Plus Format Elements
Oracle SQL*PlusPocket Reference
Section 1.1. Introduction
Section 1.2. Interacting with SQL*Plus
Section 1.3. Selecting Data
Section 1.4. Inserting Data
Section 1.5. Updating Data
Section 1.6. Deleting Data
Section 1.7. Merging Data (Oracle9i)
Section 1.8. Transaction Management
Section 1.9. Formatting Text Reports
Section 1.10. Tuning SQL
Section 1.11. SQL*Plus Format Elements
1.1 Introduction
The Oracle SQL*Plus Pocket Reference is a quick-reference guide to SQL*Plus and to commonly
used SQL query and data manipulation statements. The purpose of this book is to help you find the
syntax of specific language elements. It is not a self-contained user guide; basic knowledge of
SQL*Plus is assumed. For more information, see my book Oracle SQL*Plus: The Definitive Guide
(O'Reilly) and Mastering Oracle SQL by Sanjay Mishra and Alan Beaulieu (O'Reilly).
1.1.1 Acknowledgments
Deborah Russell, Darl Kuhn, Ken Jacobs, and Alison Holloway all played a part in making this book
a reality. For their assistance and support, I'm most grateful.
1.1.2 Conventions
UPPERCASE
Indicates SQL*Plus, SQL, or PL/SQL keywords
lowercase
Indicates user-defined items such as table names
Italic
Indicates filenames, emphasis, introduction of new terms, and parameter names
Constant width
Used for code examples
Constant width bold
Indicates user input in examples showing an interaction
[ ]
Used in syntax descriptions to denote optional elements
{ }
Used in syntax descriptions to denote a required choice
|
Used in syntax descriptions to separate choices
_
Used in syntax descriptions to indicate that the underlined option is the default
1.2 Interacting with SQL*Plus
This section covers essential information you need to know to interact with SQL*Plus. Here you will
learn how to start SQL*Plus, enter commands, delimit strings, and name variables.
1.2.1 Starting SQL*Plus
Invoke SQL*Plus by issuing the sqlplus command from your operating-system command prompt.
On Microsoft Windows systems, use either sqlplus or sqlplusw depending on whether you want
SQL*Plus to run in a command-prompt window or in its own window; you can also select an icon
from the Start menu. (Early releases of SQL*Plus on Windows used executable names such as
PLUS33 and PLUS80W.)
Beware of passing your password as a command-line argument to
SQL*Plus. Such passwords may be easily visible to other users on Linux
and Unix systems.
1.2.1.1 Syntax for the sqlplus command
The syntax used to invoke SQL*Plus is as follows:
sqlplus [[-S[ILENT]] [-H[ELP]] [-V[ERSION]]
[-R[ESTRICT] level] [-L[OGON]]
[-M[ARKUP] "markup_options"]
[ [username[/password][@connect]|/
[AS {SYSDBA|SYSOPER}]]
|/NOLOG]
[@scriptfile [arg1 arg2 arg3...]]]
The -RESTRICT and -MARKUP parameters are new in Oracle8i. -HELP and -VERSION are new
in Oracle9i. Here are the parameter descriptions:
-S[ILENT]
Tells SQL*Plus to run in silent mode. No startup message is displayed; no command
prompt is displayed; no commands are echoed to the screen.
-H[ELP]
Causes SQL*Plus to display a short summary of this syntax. Prior to Oracle9i, use sqlplus -
to get the help summary.
-V[ERSION]
Causes SQL*Plus to display version and copyright information. Prior to Oracle9i, use
sqlplus -? to get version and copyright information.
-R[ESTRICT] level
Restricts what the user can do from SQL*Plus. The level must be one of the following:
1
Disables the EDIT, HOST, and ! commands
2
Disables the EDIT, HOST, !, SAVE, SPOOL, and STORE commands
3
Disables the EDIT, GET, HOST, !, SAVE, START, @, @@, SPOOL, and STORE
commands
Level 3 also disables the reading of the login.sql file. The glogin.sql file is read, but
restricted commands aren't executed.
-L[OGON] (new in Oracle9i Release 9.2)
Prevents SQL*Plus from reprompting for the username and password in the event that the
first username and password passed is incorrect.
-M[ARKUP] markup_options
Allows you to specify the markup language to use when generating output. Except for
HTML, all markup options are optional. The following are valid markup options. Default
values are underlined or noted in the text.
HTML {ON | OFF}
Specifies the markup language to use and enables or disables the use of that markup
language. You must specify a value for this option.
HEAD text
Specifies content for the <head> tag. The tag is written as <head>text</head>.
BODY text
Specifies attributes for the <body> tag. The tag is written as <body text>.
TABLE text
Specifies attributes for the <table> tag that formats query output. The tag is written as
<table text>.
ENTMAP {ON | OFF}
Controls whether SQL*Plus uses HTML equivalents such as < and > for special
characters such as "<" and ">".
SPOOL {ON | OFF}
Controls whether SQL*Plus writes <html>, <head>, and <body> tags to any spool file you
create during your SQL*Plus session, while HTML is ON.
PRE[FORMAT] {ON | OFF}
Controls whether query output is enclosed within <pre> ... </pre> tags rather than within
HTML tables.
On some operating systems, you need to enclose the entire string of markup options within
double quotes. For example:
sqlplus -m "html on spool off"
Furthermore, any HEAD, BODY, and TABLE text should itself be quoted, and you must
escape the quotes:
sqlplus -m "html on table \"width=50% align='left'\""
The backslash-quote (\") syntax works on Windows XP, Linux, and Unix, and places a
quote (
") within the string that is the value for the -M option.
username [/password][@connect]
Your database login information. connect is an Oracle Net connect identifier such as those
defined in $ORACLE_HOME/network/admin/tnsnames.ora.
剩余55页未读,继续阅读
资源评论
HensonLiu
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功