Skip to Main Content
Oracle SQL*Plus: The Definitive Guide
book

Oracle SQL*Plus: The Definitive Guide

by Jonathan Gennick
March 1999
Intermediate to advanced content levelIntermediate to advanced
528 pages
14h 39m
English
O'Reilly Media, Inc.
Content preview from Oracle SQL*Plus: The Definitive Guide

The SQL Buffer

SQL*Plus keeps a copy of the most recently entered SQL statement or PL/SQL block in an internal memory area known as the SQL buffer, often referred to simply as the buffer. The reason for this is simple. SQL*Plus needs a place to store your statement or block until you are finished entering it. SQL*Plus also provides you with the ability to edit the statement in the buffer. This can be a real convenience if you make a mistake halfway through typing a long, multiline query.

Tip

SQL*Plus buffers SQL statements and PL/SQL blocks, but not SQL*Plus commands. For example, the DESCRIBE command would not be buffered, but a SELECT statement would be. To help make the distinction, it may help to think in terms of where the command is executed. If you enter something to be executed by the database server, then it is buffered. If it’s a command local to SQL*Plus, then it is not buffered.

SQL*Plus provides two ways to edit the statement currently in the buffer. The first method is to use the set of line-editing commands built into SQL*Plus. The second method is to use the EDIT command to invoke an operating system-specific text editor, such as Notepad in the Windows environment, or vi under Unix.

Tip

If you are editing a statement in the buffer, be sure you don’t forget yourself and execute any other SQL command. Even a simple SQL command like COMMIT will overwrite the buffer. Commands to SQL*Plus, such as the editing commands, do not affect the buffer.

There are some other useful ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Oracle SQL*Plus: The Definitive Guide, 2nd Edition

Oracle SQL*Plus: The Definitive Guide, 2nd Edition

Jonathan Gennick
Oracle PL/SQL Programming, Third Edition

Oracle PL/SQL Programming, Third Edition

Steven Feuerstein, Bill Pribyl
Oracle SQL

Oracle SQL

Dan Hotka

Publisher Resources

ISBN: 1565925785Supplemental ContentCatalog PageErrata