Re: very big problem with NULL

Поиск
Список
Период
Сортировка
От Vivek Khera
Тема Re: very big problem with NULL
Дата
Msg-id x7n17jf0vq.fsf@onceler.kciLink.com
обсуждение исходный текст
Список pgsql-general
>>>>> "g" == grant  <grant@xactcommerce.com> writes:

g> However, the last time i checked, NULL does not equal to 1, 2, 3,
g> or anything else besides NULL.  Thats why I'm confused as to why
g> SELECT column FROM table WHERE column != 1 also excludes NULL,
g> because 1 does NOT have the same value as NULL.

Ok, NULL is not equal to 1, 2, 3, or anything else.  It is also not
equal to itself, and it is not inequal to anything.  NULL is special.

If you want to treat it the same as zero in your app, then you are
setting up your tables incorrectly.  Make your column "NOT NULL
default 0".

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.                Khera Communications, Inc.
Internet: khera@kciLink.com       Rockville, MD       +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/

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

Предыдущее
От: Jonathan Bartlett
Дата:
Сообщение: RE: PostgreSQL 7.1 and ORACLE 8.x
Следующее
От: Barry Jeapes
Дата:
Сообщение: Where is libpq-fe.h?