I used to use the MyISAM storage engine for MySql, and I defined a combination of three fields that would be unique.
Now I have switched to InnoDB, which I assume caused this problem, and now NULL! = NULL.
So for the following table:
ID (Auto) | Field_A | Field_B | Field_C
I can insert (Field_A, Field_B, Field_C) values ββ(1,2, NULL) (1,2, NULL) (1,2, NULL) infinitely many times.
How can I prevent this behavior?
source
share