DEL CLPPlus command

The DEL command deletes one or more lines from the SQL buffer.

Invocation

This command must be executed from the CLPPlus interface.

Authorization

None

Required connection

None

Command syntax

Read syntax diagramSkip visual syntax diagramDEL *nn mn *n LASTn L* n* LAST* L

Command parameters

You can use the parameters to specify the start and end of a range of lines to delete from the SQL buffer. If you do not specify any parameters, the current line is deleted.

n
Specifies a line number.
n m
Specifies two line numbers, where the value of m is greater than the value of n.
*
Indicates the current line.
LAST | L
Indicates the last line in the SQL buffer.

Example

In the following example, the fifth line, containing column SAL, and the sixth line, containing column COMM, are deleted from the SELECT statement in the SQL buffer:

SQL> LIST
  1  SELECT
  2    EMPNO
  3   ,ENAME
  4   ,JOB
  5   ,SAL
  6   ,COMM
  7   ,DEPTNO
  8* FROM EMP
SQL> DEL 5 6
SQL> LIST
  1  SELECT
  2    EMPNO
  3   ,ENAME
  4   ,JOB
  5   ,DEPTNO
  6* FROM EMP

The contents of line 7 becomes the contents of line 5, and the contents of line 8 becomes the contents of line 6. The contents of the current line have not changed, but the current line, marked with an asterisk, has changed from line 8 to line 6.