O'Reilly logo

Oracle SQL*Plus: The Definitive Guide by Jonathan Gennick

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Some Basic SQL*Plus Commands

Now that you know how to start SQL*Plus, it’s time to learn a few basic commands. This section will show you how to exit SQL*Plus, how to switch your database connection to another database, how to get help, and how to view a database table definition.

Tip

All SQL*Plus commands are case-insensitive; you may enter them using either lowercase or uppercase. In this book, commands are shown in uppercase to make them stand out better in the examples. Be aware, however, that when a filename is used as an argument to a command, it may or may not be case-sensitive, depending on the specific operating system you are using. For example, under Windows NT, filenames are not case-sensitive, but under Unix, they are.

EXIT

A good place to start, since you’ve just seen how to start SQL*Plus, might be with the EXIT command. The EXIT command terminates your SQL*Plus session, and either closes the SQL*Plus window (GUI version) or returns you to the operating system prompt. Used in its simplest form, the EXIT command looks like this:

SQL> EXIT
Disconnected from Personal Oracle8 Release 8.0.3.0.0 - Production
With the Partitioning option
PL/SQL Release 8.0.3.0.0 - Production

There are some optional arguments to the EXIT command, which may be used to return success or failure values to the operating system. These are useful when running scripts in batch mode, and are described fully in Chapter 7.

PASSWORD

The PASSWORD command allows you to change your database password.

Tip

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required