Re: A doubt

From: Peter H Maggio <phm1_at_cdsmail.cdc.com>
Date: 16 Feb 95 19:32:51 GMT
Message-ID: <D43yAt.6py_at_cdsmail.cdc.com>


Srinivas K. Karanam (skaranam_at_eng.auburn.edu) wrote:
: Hi,
 

: I am new to this group and also to SQL/SQLPLUS. I have a small doubt.
 

: The list command is not listing all the previous commands. Why?.
: Below you will find the example to it.
 

: SQL> list
: 1* select city,country from location
: SQL> change $city$madras$
: 1* select madras,country from location
: SQL> list
: 1* select madras,country from location
 

: Thanks in advance,
: Karanam.
: e-mail : skaranam_at_eng.auburn.edu

The list command is not exactly what you would think it is. In SQL*Plus there is only one buffer that, by default, is written  to at a time. This is called the "current buffer". When this buffer is filled with a SQL command such as a select statement then you can do any editing including list to that buffer. As soon as another SQL command is issued the current buffer is replaced with the new command. For example:

SQL> select ename, empno from emp;

. 
. 
. 

SQL> list
  1* select ename, empno from emp
SQL>
SQL>
----- At this point you can do any editing to this buffer you ----- want.
SQL>
SQL> select deptno, dname from dept;
. 
. 
. 

SQL> list
  1* select deptno, dname from dept
SQL>
SQL>
----- Now the new SQL command resides in the buffer and the old ----- one is "flushed out".

If you want to read more about this look at chapter 4 of the SQL*Plus User's Guide Version 2.0.

I hope this has been of some help.

Regards,
Pete


~ Pete Maggio                     ~ The views expressed here are my own  ~
~ Control Data Systems, Inc.      ~ and do not necessarily reflect those ~
~ 1803 Research Blvd, Suite 500   ~ of Control Data Systems, Inc.        ~
~ Rockville, MD 20850-2059        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Internet: <pete.maggio_at_cdc.com> ~ The Internet is, by far, the great-  ~
~ Voice:    202.272.1387          ~ est and most significant achievement ~
~ FAX:      202.272.0292          ~ in the history of mankind.  -H. Hahn ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Received on Thu Feb 16 1995 - 20:32:51 CET

Original text of this message