Re: Replace null values

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: Replace null values
Дата
Msg-id 4BA84570.2090000@hogranch.com
обсуждение исходный текст
Ответ на Replace null values  (Nilesh Govindarajan <lists@itech7.com>)
Ответы Re: Replace null values  (Nilesh Govindarajan <lists@itech7.com>)
Список pgsql-general
Nilesh Govindarajan wrote:
> Hi,
>
> In my query, some rows have null values (length 0).

a NULL value is not length 0, NULL is not the empty string, rather, NULL
is no value at all.

if you want to change a 0 length string to something, use a CASE or
something.

select CASE WHEN u.name = '' THEN 'anon' ELSE u.name,  ....





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

Предыдущее
От: Nilesh Govindarajan
Дата:
Сообщение: Replace null values
Следующее
От: Nilesh Govindarajan
Дата:
Сообщение: Re: Replace null values