I am not convinced that index on nullable field is a design flaw. This is not the 
behavior in the major databases. To match and join two nulls, IS NULL should be 
expected to be used instead of a.col1 = b.col2.

-----Original Message-----
From: Jan Steinman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 10, 2002 9:45 AM
To: [EMAIL PROTECTED]
Subject: Re: NULL sometimes joins to NULL


>From: [EMAIL PROTECTED]
>
>After adding a key to a nullable column, null values will
>successfully join through to null values in other tables.

And this is a problem because? :-)

Seriously, it may be a bug, but IMHO it is a design flaw to index a NULL field. 
Indexed fields should always be NOT NULL, with the possible exception of FULLTEXT 
indeces.

But if one DOES have NULLs in an indexed field, I'd fully expect them to match and 
join other NULLs.

---- SQL SQL SQL SQL SQL SQL SQL SQL SQL SQL ----

-- 
: Jan Steinman -- nature photography: <http://www.Bytesmiths.com>
: Bytesmiths -- artists' services: <http://www.Bytesmiths.com/Services>
: Join the forums at <http://www.Bytesmiths.com/wiki>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to