Re: Is NULL equal to NULL or not?

From: Mike Mascari <mascarm(at)mascari(dot)com>
To: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
Cc: jco(at)cornelius-olsen(dot)dk, pgsql-general(at)postgresql(dot)org
Subject: Re: Is NULL equal to NULL or not?
Date: 2002-12-09 23:06:46
Message-ID: 3DF52206.5060507@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

scott.marlowe wrote:
> On Mon, 9 Dec 2002 jco(at)cornelius-olsen(dot)dk wrote:

>>I've noticed that
>> select NULL=NULL;
>>yields TRUE. It is also possible to select rows in this manner.
>
>
> That's NOT because null EQUALS null, but because it allowed you to assign
> one null value to another. which technically can be done, so it came out
> true.

It *is* because null EQUALS null, on version 7.1. '=' is the
comparison operator. ':=' is the PL/pgSQL assignment operator.
Older versions of PostgreSQL allowed comparisons between NULLs
for compatibility with older versions of Access.

Mike Mascari

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2002-12-09 23:08:10 Re: MD5 question?
Previous Message Williams, Travis L, NPONS 2002-12-09 23:04:57 Re: Field sizes and structure