Re: comparing nulls

Поиск
Список
Период
Сортировка
От D'Arcy J.M. Cain
Тема Re: comparing nulls
Дата
Msg-id 200401200906.19322.darcy@druid.net
обсуждение исходный текст
Ответ на comparing nulls  (Kenneth Gonsalves <lawgon@thenilgiris.com>)
Список pgsql-sql
On January 20, 2004 08:43 am, Kenneth Gonsalves wrote:
> in postgres7.1 i had a table where an integer field could be null. There
> was no default value. a select statement like so:
> 'select * from table where field = null'
> would give all the rows where that field had no value.
> on porting to 7.3.2, this doesnt work. How to do this?

As per the SQL standard:

SELECT * FROM table WHERE field IS NOT NULL;

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.


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

Предыдущее
От: Chris Bowlby
Дата:
Сообщение: Re: comparing nulls
Следующее
От: Luis Sousa
Дата:
Сообщение: Re: Database diagram