SQL*Plus is "the command-line interface to the Oracle database." It is a tool used to query tables and views. SQL*Plus includes formatting commands that allow you to format query results "so that you can print them and produce a credible-looking report."[4]
This section aims to cover some basic SQL*Plus commands. For additional information about SQL*Plus, please refer to the book Oracle SQL*Plus by Jonathan Gennick and Joyce Warren’s Oracle/SQL Tutorial.
To start SQL*Plus:
click on Start|Programs|Oracle for Windows 95|SQL Plus 8.0.
In the Log On screen, type the user name and password. (For example, you can
access SQL*Plus with user SAM with a password of SAM.) Then click
okay. If the database is not already started, it will start automatically once
you log on to SQL*Plus.
All SQL*Plus commands are not case sensitive. The commands in this module are shown in uppercase to make them stand out from the text.
![]()
The CONNECT command allows
you to log on as a different user, or log on to a different
database. The syntax for the CONNECT command is:
"The SYSOPER role was created for computer operators, who, in the absence of a database administrator, may need to perform such tasks as starting, stopping, and backing up the database."[4]
"The SYSDBA role is intended for database administrators. There are no restrictions on what a user with SYSDBA can do."[4]
You can connect as INTERNAL as another option for peforming database administration duties. This option was created for backwards compatibility with previous versions of Oracle and normally should not be used.[4]
You can use the DESCRIBE
command to view column definitions for a table. This command lists the
following three things for each column in the table:
The PASSWORD command lets you
change your database password. The syntax for the PASSWORD command is:
The SHOW USER command shows
the username of the user who is currently logged in to the database. Here
is an example of how the SHOW USER command works:
The EXIT command terminates the SQL*Plus session and closes the SQL*Plus window. The syntax for the EXIT command is simply EXIT.
Back to Top