| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера