From: <[EMAIL PROTECTED]> > create table a ( > b int not null, > c int null > primary_key(b,c) > ); > > With values: > 1 null > 1 null > > Logically these are unique records under the standard proviso that > null != null. Yet how could I uniquely identify the first row to delete > that row?
First of all NULL is neither equal nor not-equal to NULL. The outcome of comparing NULL to NULL is unknown AKA 'NULL' ;-) Secondly, the previous line is only true for comparing values within queries. If it comes to UNIQUE indexes than most of the time NULL != NULL, but in the case of BDB tables NULL = NULL (only a single NULL entry can be present in the UNIQUE index of a BDB table). While BDB tables are not the role model for other table types I used this example to indicate that MySQL is capable of handling NULLs this way. Thirdly, if NULL=NULL for such an index then the secod row could not have been inserted in the first place. Regards, Jigal. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]