Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to:
SQL Server
You can sort query results by one or more of the columns in the returned rows by using an ORDER BY
clause. You can define an ORDER BY
clause by choosing options in the Criteria Details pane.
Sort a query using an ORDER BY clause
Open a query or create a new one.
In the Criteria Pane (Visual Database Tools), select the Sort Type column for the row corresponding to the column that you want to use to sort your query results.
Choose Ascending or Descending from the dropdown list.
Note
Clearing the Sort Type entry for a column removes that column from the ORDER BY
clause.
As you work in the Criteria pane, your query's UNION
clause changes to match your most recent actions.
Note
When sorting results by more than one column, specify the order in which columns are searched relative to each other by using the Sort Order column. For more information, see How to: Sort Multiple Columns in Queries.