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

Line Editing

The concept of line editing goes way back to the days when all many people had to work with were dumb terminals that didn’t allow full-screen editing, and connection speeds were so slow that full-screen editing would have been very painful anyway. A good line editor will allow you to work productively at speeds as low as 300 bits per second. While this isn’t much of a concern today, it accurately reflects the environment at the time SQL*Plus was first conceived.

The line-editing process in SQL*Plus follows these steps:

  1. You enter a SQL statement or PL/SQL block, which SQL*Plus stores in the buffer.

  2. You then list the contents of the buffer to the screen.

  3. You enter SQL*Plus commands that tell SQL*Plus to make changes to the statement in the buffer.

  4. You list the buffer again.

  5. If you like what you see, you execute the statement; otherwise, you go back to step three and make some more changes.

I can remember that in my younger days my fellow programmers and I always took a great pride in the number of line-editing changes we could make and visualize in our heads before we had to break down and list our code again.

The Current Line

When working with the line editor in SQL*Plus, it’s important to understand the concept of the current line. Simply put, the current line is the one that you have most recently “touched.” When you are entering a statement, the most recently entered line is the current line. Consider the following SQL statement for example:

SQL> SELECT employee_name, ...
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