Name

CHANGE

Synopsis

C[HANGE] /old_text[/[new_text[/]]

CHANGE (not supported in iSQL*Plus) is an editing command that allows you to do a search and replace on the current line in the SQL buffer. The CHANGE command can also delete text. For example:

SQL> l
  1* select dummy,smarty from duap
SQL> c /duap/dual/
  1* select dummy,smarty from dual
SQL> c /,smarty/
  1* select dummy from dual

Parameters

old_text

The text you want to change or delete.

new_text

The replacement text.

/

Commonly used to delimit the old and new text strings, but any other character may be used as long as it is not a number or letter—and as long as it is used consistently throughout the command.

Get Oracle SQL Plus Pocket Reference, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.