ISQL and Tools

3.7.14LIST

Syntax

L[IST] [ stmt_num ];

Description

The LIST statement displays the statement with the specified statement number from the state- ment history buffer and makes it the current statement by adding it to the end of the history list.

If LIST omits stmt_num, it displays the last statement in the history buffer.

Example

The following example uses the LIST statement to display the 5th statement in the history buffer (select customer_name from customers) and copy it to the end of the history list. It then executes the now-current statement using the RUN statement:

ISQL> history

1title

2title top "fred" skip 5

3title

4help title

5select customer_name from customers

6display "Display on page break!"

7display "Test page break display" on page

8select customer_name from customers

9select customer_name from customers

10clear title

ISQL> list 5

select customer_name from customers ISQL> run

select customer_name from customers

CUSTOMER_NAME

-------------

Sports Cars Inc. Mighty Bulldozer Inc. Ship Shapers Inc.

Tower Construction Inc. Chemical Construction Inc. Aerospace Enterprises Inc. Medical Enterprises Inc. Rail Builders Inc.

Luxury Cars Inc. Office Furniture Inc. 10 records selected ISQL>

3-32

FairCom Corporation

Page 58
Image 58
HP c-tree-SQL ISQL and Tools manual List Syntax