At 12:01 PM -0700 7/29/99, Nathan Clegg wrote:
>I'm having a little trouble with NULL values. Can anyone explain this:
>
>mysql> describe test;
>+--------------+---------------------+------+-----+---------+
>| Field | Type | Null | Key | Default |
>+--------------+---------------------+------+-----+---------+
>| name | varchar(15) | YES | | NULL |
>| email | varchar(25) | YES | | NULL |
>| phone_number | int(11) | YES | | NULL |
>| id | int(11) | | PRI | 0 |
>| a | enum('one','two') | YES | | NULL |
>+--------------+---------------------+------+-----+---------+
>5 rows in set (0.01 sec)
>
>mysql> insert into test values (NULL, NULL, NULL, 9, NULL);
>mysql> insert into test values ('NULL', 'NULL', 'NULL', 10, 'NULL');
>
>mysql> select * from test where name='NULL';
>+------+-------+--------------+----+------+
>| name | email | phone_number | id | a |
>+------+-------+--------------+----+------+
>| NULL | NULL | 0 | 10 | |
>+------+-------+--------------+----+------+
>1 row in set (0.00 sec)
>
>mysql> select * from test where name=NULL;
>Empty set (0.00 sec)
>
>How can I select on NULL fields?
http://www.mysql.com/Manual_chapter/manual_Problems.html#Problems_with_NULL
--
Paul DuBois, paul@stripped