SQL*PLUS change buffer command

There are some cool SQL*PLUS command to help speed up your typing. Today I am showing the change and append buffer in the command line.

C:\oraclexe\app\oracle\product\10.2.0\server\BIN>sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 – Production on Wed Jan 23 23:04:08 2008

Copyright (c) 1982, 2005, Oracle. All rights reserved.

SQL> conn / as sysdba
Connected.
SQL>

#To change the buffer in the command line

SQL> select file_name from dba_data_files;

FILE_NAME
——————————————————————————–

C:\ORACLEXE\ORADATA\XE\USERS.DBF
C:\ORACLEXE\ORADATA\XE\SYSAUX.DBF
C:\ORACLEXE\ORADATA\XE\UNDO.DBF
C:\ORACLEXE\ORADATA\XE\SYSTEM.DBF

SQL> c/data/temp
1* select file_name from dba_temp_files
SQL> /

FILE_NAME
——————————————————————————–

C:\ORACLEXE\ORADATA\XE\TEMP.DBF

## To append the buffer in the command line

SQL> select file_name from dba_data_files;

FILE_NAME
———————————————————————-

C:\ORACLEXE\ORADATA\XE\USERS.DBF
C:\ORACLEXE\ORADATA\XE\SYSAUX.DBF
C:\ORACLEXE\ORADATA\XE\UNDO.DBF
C:\ORACLEXE\ORADATA\XE\SYSTEM.DBF

SQL> a where file_name like ‘USE%’;
1* select file_name from dba_data_files where file_name like ‘USE%’
SQL> /

no rows selected

SQL> c/USE/%USE
1* select file_name from dba_data_files where file_name like ‘%USE%’
SQL> /

FILE_NAME
———————————————————————-

C:\ORACLEXE\ORADATA\XE\USERS.DBF

SQL>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s