SQL*Plus User's Guide and Reference

Contents Index Home Previous Next

DEL

Purpose

Deletes one or more lines of the buffer.

Syntax

DEL [n|n m|n *|n LAST|*|* n|* LAST|LAST]

Terms and Clauses

Refer to the following list for a description of each term or clause:

n Deletes line n.
n m Deletes lines n through m.
n * Deletes line n through the current line.
n LAST Deletes line n through the last line.
* Deletes the current line.
* n Deletes the current line through line n.
* LAST Deletes the current line through the last line.
LAST Deletes the last line.
Enter DEL with no clauses to delete the current line of the buffer.

Usage Notes

DEL makes the following line of the buffer (if any) the current line. You can enter DEL several times to delete several consecutive lines.

Note: DEL is a SQL*Plus command and DELETE is a SQL command. For more information about the SQL DELETE command, see the Oracle7 Server SQL Language Reference Manual.

Examples

Assume the SQL buffer contains the following query:

1  SELECT ENAME, DEPTNO
2  FROM EMP
3  WHERE JOB = 'SALESMAN'
4* ORDER BY DEPTNO

To make the line containing the WHERE clause the current line, you could enter

SQL> LIST 3
  3* WHERE JOB = 'SALESMAN'

followed by

SQL> DEL

The SQL buffer now contains the following lines:

1  SELECT ENAME, DEPTNO
2  FROM EMP
3* ORDER BY DEPTNO

To delete the second line of the buffer, enter

SQL> DEL 2

The SQL buffer now contains the following lines:

1  SELECT ENAME, DEPTNO
2* ORDER BY DEPTNO


Contents Index Home Previous Next