List:General Discussion« Previous MessageNext Message »
From:doug Date:September 19 2005 4:13am
Subject:Re: Yet another null question
View as plain text  
Belay my comments on true and false. I got mixed up. That works as documented.

On Mon, 19 Sep 2005, Roger Baklund wrote:

> doug@stripped wrote:
> > I did not expect that null was not not-equal to 1.
>
> Any comparison with NULL returns NULL:
>
> mysql> select null<>1,null>1,null<1,null=1;
> +---------+--------+--------+--------+
> | null<>1 | null>1 | null<1 | null=1 |
> +---------+--------+--------+--------+
> |    NULL |   NULL |   NULL |   NULL |
> +---------+--------+--------+--------+
> 1 row in set (0.00 sec)
>
> This is the correct and desired behaviour.
>
> <URL: http://dev.mysql.com/doc/mysql/en/null-values.html >
> <URL: http://dev.mysql.com/doc/mysql/en/working-with-null.html >
> <URL: http://dev.mysql.com/doc/mysql/en/problems-with-null.html >
>
> --
> Roger
>

_____
Douglas Denault
http://www.safeport.com
doug@stripped
Voice: 301-469-8766
  Fax: 301-469-0601
Thread
Yet another null questiondoug19 Sep
  • Re: Yet another null questionRoger Baklund19 Sep
    • Re: Yet another null questiondoug19 Sep
      • Re: Yet another null questionJasper Bryant-Greene19 Sep
      • Re: Yet another null questionJoerg Bruehe20 Sep
        • Re: Yet another null questiondoug20 Sep
    • Re: Yet another null questiondoug19 Sep
  • Re: Yet another null questionMartijn Tonies19 Sep
    • Re: Yet another null questiondoug19 Sep