Re: How NULL is interpreted in Pgsql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Guru Prasad <pnguruji(at)yahoo(dot)com>
Cc: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: How NULL is interpreted in Pgsql
Date: 2001-05-15 14:12:42
Message-ID: 1156.989935962@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Guru Prasad <pnguruji(at)yahoo(dot)com> writes:
> 'select * from junk where id != 11';
> To my surprise, it displayed all the records except those which had
> 'NULL' in the 'id' field.

This is correct per spec: NULL is not a value and it doesn't act like one.
See any discussion of SQL NULLs --- Bruce's book talks about this IIRC,
or we've been over the turf more than once in the mailing list archives.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Laurent Duperval 2001-05-15 14:31:12 varbit question
Previous Message Karel Zak 2001-05-15 13:47:57 Re: Case insensitive string comparison?