$Date: 18-Dec-2002 $
$Revision: 1.66 $
$Author: Frank Naud\u00e9 $
What is SQL*Plus and where does it come from?
How does one use the SQL*Plus utility?
What commands can be executed from SQL*Plus?
What are the basic SQL*Plus commands?
I'm unable to edit files using ED/EDIT. What is wrong?
How does one enable the SQL*Plus HELP facility?
What is the difference between ? and HELP?
What is the difference between @ and @@?
What is the difference between & and &&?
What is the difference between ! and HOST?
Can one run commands when SQL*Plus starts up?
Can one set the SQL*Plus command prompt to something more useful?
How does one disable interactive prompting in SQL*Plus?
How does one trap errors in SQL*Plus?
How does one trace SQL statements in SQL*Plus?
How can one prevent SQL*Plus connection warning messages?
Can one prevent users from executing devious commands?
How does one restore session state in SQL*Plus?
How can one disable SQL*Plus formatting?
Can one pass operating system parameters to SQL*Plus?
Something's wrong with my CLOB/ NCLOB/ LONG column. Where is my
How does one copy data from one database to another in SQL*Plus?
Where can one get more info about SQL*Plus?
from scripts. SQL*Plus is frequently used by DBAs and Developers to interact with the
If you are familiar with other databases, sqlplus is equivalent to "sql" in Ingres, "isql" in
Sybase and SQLServer, "db2" in IBM DB2, "psql" in PostgresQL, and "mysql" in
SQL*Plus's predecessor was called UFI (User Friendly Interface). UFI was included in
the first releases of Oracle, its interface was extremely primitive and, in today's terms,
anything but user friendly.
Start using SQL*Plus by executing the "sqlplus" command-line utility. Valid options are:
userid/password@db -- Connection details
Look at this example session:
SQL> connect scott/tiger
SQL> select * from tab;
$ . oraenv
ORACLE_SID = [orcl] ? orcl
$ sqlplus scott/tiger
Click on "Start" -> "Run" and enter "cmd"
C:> set ORACLE_SID=orcl
C:> sqlplus scott/tiger
1. SQL*Plus commands - SQL*Plus commands are used to set options for
SQL*Plus, format reports, edit files, edit the command buffer, and so on.
SQL*Plus commands do not interact with the database. These commands do not
have to be terminated with a semicolon (;), as is the case with SQL commands.
The rest of this page is dedicated to SQL*Plus commands, eg.
Declare a variable (short: DEF)
DESCRIBE Lists the attributes of tables and other objects (short: DESC)
AFIEDT.BUF is the SQL*Plus default edit save file. When you issue the command "ed"
or "edit" without arguments, the last SQL or PL/SQL command will be saved to a file
called AFIEDT.BUF and opened in the default editor.
In the prehistoric days when SQL*Plus was called UFI, the file name was "ufiedt.buf",
short for UFI editing buffer. When new features were added to UFI, it was the initially
named Advanced UFI and the filename was changed to "aufiedt.buf" and then to
"afiedt.buf". They presumably needed to keep the name short for compatibility with some
This action might not be possible to undo. Are you sure you want to continue?