strongduanmu commented on issue #22170:
URL: 
https://github.com/apache/shardingsphere/issues/22170#issuecomment-1319480982

   In MySQL, there is no parameter for sorting NULL values - 
https://dev.mysql.com/doc/refman/8.0/en/select.html.
   
   When using asc in ascending order, the null value will be displayed first, 
which corresponds to the nulls first parameter, and when using desc in reverse 
order, the null value will be displayed last, which corresponds to the nulls 
last parameter.
   
   ```sql
   mysql> select * from t_order_0 order by content asc;
   +----------+---------+---------+
   | order_id | user_id | content |
   +----------+---------+---------+
   |        3 |       3 | NULL    |
   |        2 |       2 | TEST2   |
   +----------+---------+---------+
   2 rows in set (0.00 sec)
   
   mysql> select * from t_order_0 order by content desc;
   +----------+---------+---------+
   | order_id | user_id | content |
   +----------+---------+---------+
   |        2 |       2 | TEST2   |
   |        3 |       3 | NULL    |
   +----------+---------+---------+
   2 rows in set (0.00 sec)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to