Re: select * from mytable where myfield=null;

Поиск
Список
Период
Сортировка
От Marin Dimitrov
Тема Re: select * from mytable where myfield=null;
Дата
Msg-id 00b701c1fb4e$d9532410$9ba1d53e@sirma.bg
обсуждение исходный текст
Ответ на Re: select * from mytable where myfield=null;  ("Hoanui Morangie" <hoanui@excite.com>)
Список pgsql-jdbc
----- Original Message -----
From: "Hoanui Morangie"

>
> I need NULL value, some of these columns are foreign keys.

introduce dummy tupples too, f.e. if u consider 0 as the NULL for numbers,
then have a dummy row with ID=0, so that the FK won't be violated and u'll
still have NULL semantics

>And using dummy values is not good practice anyway.
>

indeed, 3-valued logic (nulls) is often considered as a flaw and NULL usage
is not recommended.
And in your case u won't make use of any indexes for the queries, because
these null values can't be indexed


    Marin

----
"...what you brought from your past, is of no use in your present. When
you must choose a new path, do not bring old experiences with you.
Those who strike out afresh, but who attempt to retain a little of the
old life, end up torn apart by their own memories. "




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

Предыдущее
От: "Hoanui Morangie"
Дата:
Сообщение: Re: select * from mytable where myfield=null;
Следующее
От: "Hoanui Morangie"
Дата:
Сообщение: Re: enquiring