Tuesday, September 04, 2012

SQL*Plus Clear Buffer Command


This was tested on Oracle 11.2. You can delete what you have just typed into SQL*Plus with the clear buffer command:

SQL> select count(*)
  2  from dba_tables
  3  where substr(owner,1,1) = 'A'
  4
SQL> l
  1  select count(*)
  2  from dba_tables
  3* where substr(owner,1,1) = 'A'
SQL> clear buffer
buffer cleared
SQL> l
SP2-0223: No lines in SQL buffer.
SQL>

You can do the same thing with the del command as follows but I will look at this in another post:

SQL> select owner, count(*)
  2  from dba_tables
  3  order by 1
  4
SQL> list
  1  select owner, count(*)
  2  from dba_tables
  3* order by 1
SQL> del 1 3
SQL> list
SP2-0223: No lines in SQL buffer.
SQL>

No comments: