Re: [SQL] problem with select

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [SQL] problem with select
Дата
Msg-id 15130.936106283@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [SQL] problem with select  (Holm Tiffe <holm@freibergnet.de>)
Список pgsql-sql
Holm Tiffe <holm@freibergnet.de> writes:
> It is almost working, my database isn't that big that memory becomes a
> problem; the machine has 512MB.
> But why is nothing found if one value of a column contains NULL ?

Because nulls propagate: any operator whose input is NULL produces NULL.
The only things that don't return NULL are the special syntaxes IS NULL,
IS NOT NULL, and CASE expressions using them (in particular the CASE
shortcuts COALESCE, etc).

You probably want to write COALESCE(field, '') in place of just field
for any column that can be NULL.
        regards, tom lane


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

Предыдущее
От: Holm Tiffe
Дата:
Сообщение: Re: [SQL] problem with select
Следующее
От: José Soares
Дата:
Сообщение: Re: [SQL] problem with select