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

   According to PostgreSQL 
document——https://www.postgresql.org/docs/current/queries-order.html, The NULLS 
FIRST and NULLS LAST options can be used to determine whether nulls appear 
before or after non-null values in the sort ordering. By default, null values 
sort as if larger than any non-null value; that is, NULLS FIRST is the default 
for DESC order, and NULLS LAST otherwise.
   
   ```sql
   demo_ds_0=# SELECT * FROM t_ssdb_tb_1 order by a asc;
    id | c_id | a  |     b      
   ----+------+----+------------
     2 |    1 | 20 | test21    
     2 |    3 |    | Test22    
   (2 rows)
   
   demo_ds_0=# SELECT * FROM t_ssdb_tb_1 order by a desc;
    id | c_id | a  |     b      
   ----+------+----+------------
     2 |    3 |    | Test22    
     2 |    1 | 20 | test21    
   (2 rows)
   ```


-- 
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