SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
L-17
Considerations—LIST
If you omit number, SQL uses the current value of the LIST_COUNT session
option.
Using LIST NEXT without number is equivalent to pressing the return key at the
S> prompt.
A[LL]
displays all rows of the result table and returns you to the standard SQLCI prompt
(>>).
Considerations—LIST
Rows are listed on the OUT_REPORT file, or (if you did not specify one) on the
OUT file. The default for OUT and OUT_REPORT file is the home terminal of your
SQLCI process, which is typically your terminal.
If you are experimenting with a report format, set the LIST_COUNT option to a
small number. Use LIST ALL only when you are ready to print the final report.
Example—LIST
This example sets the LIST_COUNT option to 2, issues a SELECT statement that
displays the first rows returned (because LIST_COUNT is two), and then uses the LIST
command to display the next five rows:
>> SET LIST_COUNT 2;
>> SELECT DISTINCT PARTS.PARTNUM, PARTDESC, QTY_ON_HAND,
+> LOC_CODE, PRICE
+> FROM SALES.PARTS, INVENT.PARTLOC
+> WHERE PARTS.PARTNUM = PARTLOC.PARTNUM
+> ORDER BY PARTS.PARTNUM;
PARTNUM PARTDESC QTY_ON_HAND LOC_CODE PRICE
------- ------------------ ----------- -------- ------------
212 PC SILVER, 20 MB 18 A87 2500.00
212 PC SILVER, 20 MB 20 G87 2500.00
S> L N 5;
244 PC GOLD, 30 MB 23 P78 3000.00
244 PC GOLD, 30 MB 43 A78 3000.00
255 PC DIAMOND, 60 MB 21 A21 4000.00
2001 GRAPHIC PRINTER,M1 0 P10 1100.00
2001 GRAPHIC PRINTER,M1 800 A10 1100.00