Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将这些列组合为主键。
room_no, type
例如,当我插入新数据时,0001 01.
0001 01
然后我插入0001 02.
0001 02
这是不可能的。它说重复的主键。尽管我将 2 列定义为主键,但为什么会重复。
只是一个想法:
这与复合主键的工作方式相同。
您可以阅读这篇文章:- http://www.techrepublic.com/article/the-great-primary-key-debate/1045050