Skip to content

Commit

Permalink
Merge pull request #26 from pauls-FB/patch-7
Browse files Browse the repository at this point in the history
Update select.md
  • Loading branch information
arushi-firebolt authored Jan 30, 2024
2 parents 96ca05a + b08cef2 commit f7846b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/sql_reference/commands/queries/select.md
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ When including multiple clauses, the same number of columns must be selected by

The `ORDER BY` clause sorts a result set by one or more output expressions. `ORDER BY` is evaluated as the last step after any `GROUP BY` or `HAVING` clause. `ASC` and `DESC` determine whether results are sorted in ascending or descending order. When the clause contains multiple expressions, the result set is sorted according to the first expression. Then the second expression is applied to rows that have matching values from the first expression, and so on.

The default null ordering is `NULLS LAST`, regardless of ascending or descending sort order.
NULLS FIRST is the default for DESC order, and NULLS LAST otherwise.

### Syntax
{: .no_toc}
Expand All @@ -658,7 +658,7 @@ ORDER BY <expression> [ ASC | DESC ] [ NULLS FIRST | NULLS LAST] [, ...]
| :------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `<expression>` | Each expression may specify output columns from `SELECT` or an ordinal number for an output column by position, starting at one. |
| `[ ASC | DESC ]` | Indicates whether the sort should be in ascending or descending order. |
| `[ NULLS FIRST | NULLS LAST]` | Indicates whether null values should be included at the beginning or end of the result. <br> <br> The default null ordering is `NULLS LAST`, regardless of ascending or descending sort order. |
| `[ NULLS FIRST | NULLS LAST]` | Indicates whether null values should be included at the beginning or end of the result. <br> <br> NULLS FIRST is the default for DESC order, and NULLS LAST otherwise. |

## LIMIT

Expand Down

0 comments on commit f7846b3

Please sign in to comment.