strange behaviour

From: Mathieu Arnold <mat(at)mat(dot)cc>
To: pgsql-general(at)postgresql(dot)org
Subject: strange behaviour
Date: 2001-02-25 12:37:15
Message-ID: 5.0.2.1.2.20010225133146.00a08080@wheresmymailserver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

could someone explain this to me :

sympa=> select count(*) from subscriber_table;
count
-------
14029
sympa=> select count(*) from subscriber_table where bounce_subscriber =
NULL;
count
-------
14024
sympa=> select count(*) from subscriber_table where bounce_subscriber <> NULL;
count
-------
0
sympa=> select count(*) from subscriber_table where bounce_subscriber = '';
count
-------
0
sympa=> select count(*) from subscriber_table where bounce_subscriber <> '';
count
-------
5

I was thinking that "= NULL" and "<> NULL" were oposite and that "<> NULL"
would give me the result i had with "<> ''" or am I mistaken ?

--
Mathieu Arnold

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2001-02-25 13:33:56 Re: strange behaviour
Previous Message Richard Huxton 2001-02-25 08:44:47 Re: Strange behaviour of PL/Perl