@@ -320,10 +320,10 @@ future use.] are reserved identifiers: ABS, ALL, AND, ANY, AS, ASC,
320
320
AVG, BETWEEN, BIT_LENGTH, BOTH, BY, CASE, CEILING, CHAR_LENGTH,
321
321
CHARACTER_LENGTH, CLASS, COALESCE, CONCAT, COUNT, CURRENT_DATE,
322
322
CURRENT_TIME, CURRENT_TIMESTAMP, DELETE, DESC, DISTINCT, ELSE, EMPTY,
323
- END, ENTRY, ESCAPE, EXISTS, EXP, EXTRACT, FALSE, FETCH, FLOOR, FROM ,
324
- FUNCTION, GROUP, HAVING, IN, INDEX, INNER, IS, JOIN, KEY, LEADING,
325
- LEFT, LENGTH, LIKE, LOCAL, LN, LOCATE, LOWER, MAX, MEMBER, MIN, MOD,
326
- NEW, NOT, NULL, NULLIF, OBJECT, OF, ON, OR, ORDER, OUTER, POSITION,
323
+ END, ENTRY, ESCAPE, EXISTS, EXP, EXTRACT, FALSE, FETCH, FIRST, FLOOR ,
324
+ FROM, FUNCTION, GROUP, HAVING, IN, INDEX, INNER, IS, JOIN, KEY, LEADING,
325
+ LAST, LEFT, LENGTH, LIKE, LOCAL, LN, LOCATE, LOWER, MAX, MEMBER, MIN, MOD,
326
+ NEW, NOT, NULL, NULLS, NULLIF, OBJECT, OF, ON, OR, ORDER, OUTER, POSITION,
327
327
POWER, ROUND, SELECT, SET, SIGN, SIZE, SOME, SQRT, SUBSTRING, SUM,
328
328
THEN, TRAILING, TREAT, TRIM, TRUE, TYPE, UNKNOWN, UPDATE, UPPER,
329
329
VALUE, WHEN, WHERE.
@@ -2510,6 +2510,7 @@ orderby_clause ::= ORDER BY orderby_item {, orderby_item}*
2510
2510
orderby_item ::=
2511
2511
{state_field_path_expression | general_identification_variable | result_variable}
2512
2512
[ASC | DESC]
2513
+ [NULLS {FIRST | LAST}]
2513
2514
----
2514
2515
2515
2516
An orderby_item must be one of the following:
@@ -2586,7 +2587,9 @@ ordering be used for the associated _orderby_item_; the keyword DESC
2586
2587
specifies that descending ordering be used. Ascending ordering is the
2587
2588
default.
2588
2589
2589
- SQL rules for the ordering of null values
2590
+ The keyword NULLS specifies the ordering of null values, either FIRST or LAST.
2591
+
2592
+ If NULLS is not specified, SQL rules for the ordering of null values
2590
2593
apply: that is, all null values must appear before all non-null values
2591
2594
in the ordering or all null values must appear after all non-null values
2592
2595
in the ordering, but it is not specified which.
@@ -2985,6 +2988,7 @@ orderby_item ::=
2985
2988
general_identification_variable |
2986
2989
result_variable
2987
2990
[ASC | DESC]
2991
+ [NULLS {FIRST | LAST}]
2988
2992
subquery ::= simple_select_clause subquery_from_clause [where_clause]
2989
2993
[groupby_clause] [having_clause]
2990
2994
subquery_from_clause ::=
0 commit comments