NULL sorts as largest?

Started by Dmitri Bichkoalmost 23 years ago2 messagesgeneral
Jump to latest
#1Dmitri Bichko
dbichko@genpathpharma.com

I am noticing that null values come out as the largest value when
sorting on a field (or last with ASC and first with DESC). Is there any
way to change this behaviour? It's somewhat strange to do a descending
sort on a column and get all the stuff that's not there first.

Thanks,
Dmitri

#2Stephan Szabo
sszabo@megazone23.bigpanda.com
In reply to: Dmitri Bichko (#1)
Re: NULL sorts as largest?

On Tue, 27 May 2003, Dmitri Bichko wrote:

I am noticing that null values come out as the largest value when
sorting on a field (or last with ASC and first with DESC). Is there any
way to change this behaviour? It's somewhat strange to do a descending
sort on a column and get all the stuff that's not there first.

I think the best you can do is ordering by field is [not] null first and
then by the field (choosing not depending on the sort order you want).