How to avoid duplicates in the unique composite key, when one of the values NULL?

question incorrect and was therefore closed. remove it please
April 4th 20 at 13:04
2 answers
April 4th 20 at 13:06
The program works right, Bob+ null in the phone and then in the mail will not work, maybe Bob + null will repeat you the key. And what you don't like option 3 m fields?
if 3 then fields ("John", "123", 'mail1') ("John", "123", 'mail2') and is required to avoid presence of 2 records ("Bob", "123" ) - Shanny.Zulauf3 commented on April 4th 20 at 13:09
Make a unique index on the fields as did earlier and you will be happy - Bettye.Altenwerth96 commented on April 4th 20 at 13:12
April 4th 20 at 13:08
to normalize relations. if you want to record phones X and Y addresses for the same user, then it should be done differently
it's not a few "phones". it is necessary to control what would one name neither phone nor email are not repeated. - Shanny.Zulauf3 commented on April 4th 20 at 13:11

Find more questions by tags MySQL