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

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, ...

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