MySQL Question - Unique Key Not functioning correctly, or am I misunderstanding?

前端 未结 5 1717
忘掉有多难
忘掉有多难 2020-12-16 15:30

I\'m trying to create a relation where any of four different parts may be included, but any collection of the same parts should be handled as unique.

Example: An ass

5条回答
  •  无人及你
    2020-12-16 15:51

    In MySQL NULL != NULL, or anything. So that is what the UNIQUE doesn't work. You should use another default value for blanks, like zero

提交回复
热议问题