From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Ludwig Lim <lud_nowhere_man@yahoo.com>
Cc: PostgreSQL Mailing List <pgsql-sql@postgresql.org>
Subject: Re: Some more weird NULL behavior
Date: Fri, 8 Nov 2002 21:13:43 -0800 (PST)
Message-ID: <20021108210410.F19592-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <20021109043013.3645.qmail@web80307.mail.yahoo.com>
On Fri, 8 Nov 2002, Ludwig Lim wrote:
> Hi:
>
> I tried the following:
> CREATE TABLE x(
> a NUMERIC(5,0),
> b VARCHAR(5)
> );
>
> CREATE TABLE y(
> a INTEGER,
> b VARCHAR(5)
> );
>
> INSERT INTO x(b) VALUES ('LUDZ');
> INSERT INTO y(b) VALUES ('TEST');
>
> SELECT x.b,y.b FROM x,y WHERE x.a=y.a
> returns zero rows.
A comparison of two NULL values does not
return true, it returns unknown.
If you want to say equal or both null you
should do it explitly.
(x.a=y.a) or (x.a is null and y.a is null)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: sszabo@megazone23.bigpanda.com, lud_nowhere_man@yahoo.com
Subject: Re: Some more weird NULL behavior
In-Reply-To: <20021108210410.F19592-100000@megazone23.bigpanda.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox