1
我很难找到在表中创建唯一依赖关系的文档,例如,有2列,每个可以有多个相似的值,但绝不会有2行,其中两列都有相同的值(在另一行)...如何在mysql中创建独特的依赖关系?
换句话说...
colA colB
row1 1 2 //this is ok
row2 1 3 //this is ok
row3 2 2 //this is ok
row4 2 2 //this would NOT be ok, because this is just like row 3, and that combination should be unique.
谢谢...我误解唯一限制一列,而不是组合的唯一性。 – 2009-05-28 18:00:02