Re: ORDER BY - problem with NULL values

Поиск
Список
Период
Сортировка
От Tommy Gildseth
Тема Re: ORDER BY - problem with NULL values
Дата
Msg-id 470F62E5.2020800@usit.uio.no
обсуждение исходный текст
Ответ на ORDER BY - problem with NULL values  (Stefan Schwarzer <stefan.schwarzer@grid.unep.ch>)
Список pgsql-general
Stefan Schwarzer wrote:
> Hi there,
>
> if I order a given year in DESCending ORDER, so that the highest
> values (of a given variable) for the countries are displayed at the
> top of the list, then actually the NULL values appear as first. Only
> below, I find the values ordered correctly.
>
> Is there any way to
>
>    a) make the countries with NULL values appear at the bottom of the list

... ORDER BY y_2000 IS NULL [DESC], y_2000;

>    b) neglect the NULL values by still allowing the countries to be
> displayed

Not quite sure what you mean by this.


--
Tommy Gildseth


В списке pgsql-general по дате отправления:

Предыдущее
От: Nico Sabbi
Дата:
Сообщение: Re: ORDER BY - problem with NULL values
Следующее
От: "Merlin Moncure"
Дата:
Сообщение: Re: Coercing compound types to use generic ROW comparison operators