SQL/MX Quick Start (G06.24+, H06.03+)

Selecting Information From a Table
HP NonStop SQL/MX Quick Start523724-002
2-6
Displaying Information in an Ordered Sequence
Example
Determine which sales representatives have orders in the ORDERS table and display
each identification number only once:
SELECT DISTINCT SALESREP FROM ORDERS;
The selected rows are:
SALESREP
--------
220
221
222
223
226
227
229
231
568
--- 9 row(s) selected.
Displaying Information in an Ordered
Sequence
To display the selected rows in a sorted order, include the ORDER BY clause in the
SELECT statement. You can specify more than one column to determine the sequence
of the rows.