From b08cef21714886ddd4a15b1bd897c1f2a0173bf2 Mon Sep 17 00:00:00 2001 From: pauls-FB <96253739+pauls-FB@users.noreply.github.com> Date: Tue, 30 Jan 2024 10:05:29 -0800 Subject: [PATCH] Update select.md Correct NULLS LAST default comment --- docs/sql_reference/commands/queries/select.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sql_reference/commands/queries/select.md b/docs/sql_reference/commands/queries/select.md index 5199a80b..0d9acde9 100644 --- a/docs/sql_reference/commands/queries/select.md +++ b/docs/sql_reference/commands/queries/select.md @@ -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} @@ -658,7 +658,7 @@ ORDER BY [ ASC | DESC ] [ NULLS FIRST | NULLS LAST] [, ...] | :------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `` | 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.

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.

NULLS FIRST is the default for DESC order, and NULLS LAST otherwise. | ## LIMIT