|List:||General Discussion||« Previous MessageNext Message »|
|From:||Jigal van Hemert||Date:||April 27 2005 7:09am|
|Subject:||Re: why NOT NULL in PRIMARY key??|
|View as plain text|
From: "Mikhail Entaltsev" Mikhail, > Before inserting MySQL will try to find a record with the same values. > But since comparison with NULL value returns always FALSE > MySQL will think that there is no such record in the table. > After this point you will get 2 identical records in the table. MySQL as a whole seems a bit more flexible: a UNIQUE index allows multiple NULL values (which seems to follow the NULL handling you describe), but with BDB table only a single NULL value is allowed in a UNIQUE index (so MySQL seems to be able to find a NULL value in de db). Anyway, I gues it's just a question of following a standard and optimizing the engine according to that standard. Regards, Jigal.