HISTORY
Syntax
HI[STORY];
Description
The HISTORY statement lists the statements in the statement history buffer, along with an identifying number.
Notes
Example
The following example illustrates usage of the HISTORY statement.
ISQL> HISTORY -- Display statements in the history buffer
1 start start_ex.sql Ship
2 SELECT customer_name FROM customers
WHERE customer_name LIKE 'Ship%'
3 select tbl from systables where tbltype = 'T'
ISQL> RUN 2 -- Run the query corresponding to statement 2
SELECT customer_name FROM customers
WHERE customer_name LIKE 'Ship%'
CUSTOMER_NAME
-------------
Ship Shapers Inc.
1 record selected
ISQL> HI -- In addition to executing, statement 2 is now the current statement
1 start start_ex.sql Ship
2 SELECT customer_name FROM customers
WHERE customer_name LIKE 'Ship%'
3 select tbl from systables where tbltype = 'T'
4 SELECT customer_name FROM customers
WHERE customer_name LIKE 'Ship%'
ISQL> LIST 3 - Display statement 3 and copy it to the end of the history list
select tbl from systables where tbltype = 'T'
ISQL> history -- Statement 3 is now also the current statement
1 start start_ex.sql Ship
2 SELECT customer_name FROM customers
WHERE customer_name LIKE 'Ship%'
3 select tbl from systables where tbltype = 'T'
4 SELECT customer_name FROM customers
WHERE customer_name LIKE 'Ship%'
5 select tbl from systables where tbltype = 'T'