From: "Frank Bax" > At 11:07 AM 4/27/05, Jigal van Hemert wrote: > >So, if we would define that the key entry "0-NULL-Whatever" equals > >"0-NULL-Whatever" (which MySQL is capable of if you look at the definition > >of UNIQUE indexes with BDB tables) then allowing NULLs as part of a key > >entry would not permit duplicate entries. At least not more than allowing > >other values. > > You cannot "define" that those keys are equal, because SQL standard states > that "0-NULL-Whatever" is *always* *not-equal* to "0-NULL-Whatever".
Allowing only a single NULL entry in a UNIQUE index of BDB tables would also imply that in at least one case a new NULL "value" is treated as equal to the NULL that is already present in the index. A "duplicate key" error would IMHO mean that a value that one tried to insert is equal to a value that is already present in the index... But you are also not quite right stating that "0-NULL-Whatever" is not equal to "0-NULL-Whatever". Comparing two NULLs will not result in equal or not equal, but in unknown (represented by NULL) ;-P Regards, Jigal. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]