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 shows you how to exit SQL*Plus, how to change your database password, how to get help, how to view a database table definition, how to switch your database connection to another database, and more.
Tip
All SQL*Plus commands are case-insensitive; you may enter them using either lowercase or uppercase. In this book, commands are shown uppercase to make them stand out better in the text and examples. In practice, you're more likely to enter ad hoc commands in lowercase, and that's perfectly fine.
Note
Filenames may or may not be case-sensitive, depending on your operating system. For example, under Windows, filenames are not case-sensitive, but under Unix, they are.
EXIT
A good place to start, because you've just seen how to start SQL*Plus, is with the EXIT command. EXIT terminates your SQL*Plus session and 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 Oracle Database 10g Enterprise Edition Release
10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
oracle@gennick02:~>
Some optional arguments to the EXIT command 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 11.
Warning
EXIT should really be thought of as ...
Get Oracle SQL*Plus: The Definitive Guide, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.