SQL Extensions   «Prev  Next»

Lesson 2Using the SQL*Plus Environment
ObjectiveDescribe SQL*Plus and identify when to use it.

Using the SQL*Plus Environment

Oracle's SQL*Plus is a programming environment that is packaged with Oracle's database software on all platforms. It has been shipped with Oracle since the first release of the database. There are dozens of additional software packages that Oracle sells to interact with the database engine, but SQL*Plus still stands as a simple and easy-to-use tool for the programmer, developer, and database administrator.

What is sql Plus
As you saw in a previous module, SQL*Plus has two flavors: a command line interface and a Windows-like interface. The two interfaces are very similar. Even though this course uses the windows-like interface, all the commands you learn here work identically in both interfaces.
A new tool called SQLPlus Worksheet is now shipped with the Enterprise Manager. It has a similar look and feel to SQL*Plus, but has the advantage of being capable of running within a Web browser. The next lesson describes the in-line editor that is included for use in SQL*Plus.

Who Can Use SQL*Plus

The SQL*Plus, SQL, and PL/SQL command languages are powerful enough to serve the needs of users with some database experience, yet straightforward enough for new users who are just learning to work with the Oracle Database. The SQL*Plus language is easy to use. For example, to rename a column labelled
LAST_NAME with the heading "Family Name", enter the command:
COLUMN LAST_NAME HEADING 'Family Name'

Similarly, to list column definitions for the EMPLOYEES table, enter the command:
DESCRIBE EMPLOYEES

SQL*Plus Command-line Architecture

SQL*Plus command-line uses a two-tier model comprising:
  1. Client (command-line user interface).
  2. Database (Oracle Database).The two tiers may be on the same machine.
  3. SQL*Plus Client: The command-line user interface is the character-based terminal implementation.
  4. Oracle Database: Oracle Database Net components provide communication between the SQL*Plus Client and Oracle Database.