The phenomenon where null appears at the top when sorting from the large number in postgresql

Asked 2 years ago, Updated 2 years ago, 118 views

I'm trying to sort it by score and look at it from the top one by one, but the null value comes out at the top. I'm going to exclude the null I put where('score is not null') but can't I do it at once with the order?

postgresql sorting

2022-09-22 20:12

1 Answers

If postgresql, the syntax of Oracle is almost supported.

order by nulls last 

It should be possible to specify the location of null.


2022-09-22 20:12

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.