Sort on fields with NULL values - 12/22/2002 2:44 PM
I have a problem on my server (running MySQL 4.0.6) when sorting on fields that have NULL values... The rows with NULL in the order by field always shows up first both on ASC and DESC. Because of this, the empty rows always shows on the first page on the user list for example, not very user friendly. I just noticed that this is not the case here at td, so I'm figuring it's either to do with the MySQL-version or some configure option.
The MySQL manual is a bit indecisive about the fact, in one place it says that NULL values always shows up first, and in another place it says NULL values are listed at the bottom when sorting on DESC.
Does anyone have any insight on this?
The MySQL manual is a bit indecisive about the fact, in one place it says that NULL values always shows up first, and in another place it says NULL values are listed at the bottom when sorting on DESC.
Does anyone have any insight on this?