DB2 Server for VSE & VM: Interactive SQL Guide and Reference


Altering and Reusing SQL Lines

The RETRIEVE facility is especially useful when you enter similar commands. To save time, you can retrieve an earlier command, alter it, and then enter it.

For example, enter the following statement:

   select * -
   from employee

Your next statement to be typed is select * from department. To save time, reuse the statement you just typed as follows.

Press PF12 twice to place select * - in the input area. Then, press ENTER.

Press PF12 twice. from employee is now contained in the input area. Backspace and type DEPARTMENT over EMPLOYEE. Then, press ENTER.

In this way, select * from department is typed in just a few keystrokes.

Remember, a variable number of your statements are retained, and you may or may not be able to retrieve a particular statement.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]