Database Reference
In-Depth Information
Creating and Managing Sequences
Altering and Dropping Sequences
Creating and Managing Synonyms
Summary and Concluding Remarks
11.1 Overview of Oracle's SQL Environment
The most basic working environment provided in Oracle is the Oracle SQL *Plus
environment. It is a command entry interface, and gives the new SQL user an excellent
opportunity to learn the language. This default editor is a line editor: you are allowed to
enter your SQL command on a line-by-line basis, terminated by a semicolon or forward
slash (/). Some line editing commands and file editing commands are included in
Figure 11-2 .
Figure 11-2. Oracle SQL *Plus Editing Commands
Alternately, you can use Notepad or any other text editor to key in your SQL
statements, save it as a text file, then read it into the SQL *Plus environment via the GET
or START command for text ( .txt ) files, or the @ command for SQL ( .sql ) files. In such
case, the path and filename must be specified within single quotes.
In addition to SQL *Plus, Oracle provides other more user-friendly GUI-based
components for learning and using SQL. These include Oracle Enterprise Manager (OEM),
Oracle SQL Developer (OSQLD), and Oracle iSQL *Plus. You may read more about these
components in Chapters 16 and 25. Finally, Oracle implements its own host language,
called PL/SQL. It is a simple language with a predominantly Pascal-like syntax. Although
coverage of the syntax of this language is beyond the scope of this course, a few examples
will contain Pl/SQL code (particularly in Chapter 12). Because of the simplicity of the
syntax, you should be able to read the code and understand it, so there is no need to panic.
Throughout the remainder of the course, a slight modification of the BNF notation
will be used for specifying the syntax of SQL statements. The symbols used are shown in
Figure 11-3 . Additionally, from time to time, you will observe the inclusion of clarifying
comments that conform to how comments are made in the C-based programming
languages (e.g. // this is a comment, /* and so is this */). These comments serve to clarify
the syntactic representations or examples that they appear in.
 
Search WWH ::




Custom Search