I have a unique index on my table, the unique index is on all 4 columns.
 firstname VARCHAR NOT NULL
 lastname VARCHAR NOT NULL
 dateofbirth DATE NULL
 reference VARCHAR NULL
From what I have read (and recently discovered), is that mysql does not enforce uniqueness for columns with NULL value.
In my case firstname and lastname area always populated, but dateofbirth and reference are optional, and set to null by default.
I have changed reference column from NULL to NOT NULL default value '', but how can I do the same for date of birth without actually changing the column type to a VARCHAR ?
 
    