Use this tab to sort the rows in your result set.
Available columns This box lists all the tables you have chosen for your query, and the columns in each table. It also lists any computed columns that you defined in the Columns tab.
ORDER BY columns This box stores the columns you have chosen to sort on. To sort on a column, select a column or set of columns in the Available Columns box and click the right arrow. To delete a column, select it in the ORDER BY Columns box and click the left arrow. Use the up and down arrows to specify the order of column evaluation. You can sort on column aliases.
Expression Editor Click the Calculator icon, located between the right and left arrows, to open the Expression Editor and build your ORDER BY condition.
Results Click Results at the bottom of the dialog to see the results of your query, or an error message if the query contains errors.
SQL Click SQL at the bottom of the dialog to see the SQL code for your query.
Each item in the ORDER BY list can be labeled as an up arrow for ascending order (the default) or a down arrow for descending order. To change the order from ascending to descending, click the arrow.
The only way to ensure that rows are returned in a particular order is to use ORDER BY. In the absence of an ORDER BY clause, SQL Anywhere returns rows in whatever order is most efficient. This means that the appearance of result sets may vary depending on when you last accessed the row and other factors.