Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

ORDER BY clauses sort the records in the results of a SELECT statement. When a column is dropped inside the [Order By] Deck the column is given a sort order, which is indicated by the large arrow icon at the right side of the column name.

Query Builder - Drag Column to Order ByImage RemovedImage Added

By default, all columns are given ascending order.

To Modify an ORDER BY Clause

1. Right-click a column in the [Order By] Deck and pick a different sort order.

2. Left-click the the column's sort icon and pick a different sort order [Ascending, Descending, Random, or None].

3. Or right-click to select a Function [AVG, COUNT, COUNT_BIG, MAX, MIN, SUM] 

Query Builder - Modify Order ByImage RemovedImage Added

4. Or select [Custom Expression] from the bottom of the [Functions] list to write a Custom Expression

Query Builder - Order By - Custom Expression DialogImage RemovedImage Added

If more than one column is placed in the [Order By] Deck the SQL Pane will reflect its addition. Dragging columns into a new order alters which Order By occurs first.

...