Chapter 2. Interacting with SQL*Plus

This chapter shows you the rudiments of interacting with SQL*Plus. The first part of this chapter shows how to start SQL*Plus and connect to a database. You will then read about a few basic SQL*Plus commands you can use to get started. Following that are some examples showing how to enter SQL statements and PL/SQL blocks. The remainder of the chapter focuses on editing your SQL and PL/SQL. There is extensive coverage of the built-in line-editing commands, and you will also see how you can work with an external editor such as Windows’ Notepad.

Starting SQL*Plus

How you start SQL*Plus varies somewhat between operating systems, and also depends on whether you are operating in a GUI environment such as Windows NT or a command-line environment such as DOS or Unix. Generally speaking though, if you are using a command-line operating system, you use the SQLPLUS command. On case-sensitive operating systems, such as Unix, the command must be entered in lowercase as sqlplus . If you are using Windows, or another GUI-based operating system, you click or double-click on an icon.

Command-Line Versus GUI Versions

There are two variations of SQL*Plus, command-line and GUI. The command-line implementation was the original, and is the one shipped with Oracle for Unix, VMS, and other command-line operating systems. A command-line version even ships with the Windows client software, in case you want to invoke SQL*Plus from a DOS prompt. For Microsoft Windows, ...

Get Oracle SQL*Plus: The Definitive Guide 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.