SORT
The SORT command sorts table rows during a browse or edit session and sorts objects in a list. The SORT command can also be issued on SQL Development and Analysis selection screens. The valid sort parameters for these screens are listed with each screen display. See SQL-Development-and-Analysis-function for more information.
SORT in Browse or Edit
In a browse or edit session, the SORT command sorts the rows of a table by the columns you specify. You must specify a sort order (ascending or descending) for all columns except the last one entered. The display is repositioned to the beginning row of the sorted results.
The SORT command defaults to sorting only non-excluded rows. Excluded rows are placed at the end of the sorted table. If the ALL parameter is used, excluded rows become visible and are sorted.

ALL
Specifies the sort is done on all rows (excluded and non-excluded). If specified, ALL must be the first parameter.
column-name
Name of the table column by which you want to sort. Partial column names may be entered. If more than one column name matches the criteria, the window in Column Selection window displays only those matching the criteria. See Partial-Column-Names for more information.
A
Specifies the sort is to be in ascending order. Default only for the last column name specified.
D
Specifies the sort is to be in descending order.
SORT Command Window
The SORT command window (see the following figure) lists all the columns in the table, allowing you to select your sort order. It displays when you enter SORT with no parameters. Press Enter on this screen to process the sort and exit the window. Press END to cancel the SORT command and exit the window.
SORT Command Window

Sort order
Specify the sort order of the columns. For example, 1 is the primary sort order, 2 is the secondary, etc.
A/D
Specify A to sort in ascending order and D to sort in descending order. Ascending is the default.
Column name
Name of the table column.
SORT in an Object List
From a displayed object list, the SORT command sorts by name, type, or creator.

NAME
Sorts by object name.
TYPE
Sorts by object type.
CREATOR
Sorts by creator’s user ID.