本文介绍了表中的多个主键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
-SA
—SA
如何在表格中设置多个主键 ..
how to set multiple primary keys in a table ..
推荐答案除了解决方案1: 首先学习一些基础知识非常有用,特别是关于唯一键和主键。请参阅: en.wikipedia/wiki/Primary_key [ ^ ]。 注意该部分:主键和唯一键之间的差异: In addition to Solution 1: It would be very useful for you to learn some basics first, in particular, about unique and primary keys. Please see: en.wikipedia/wiki/Primary_key[^]. Pay attention for the section: "Differences between Primary Key and Unique Key": 维基百科说:
每个表最多只能有一个主键。
Each table can have at most one primary key.
所以,不,你不能有多个主键。你不想要它。这没有多大意义。语法图中的多样性 COLUMN表达式这一事实应该足够你了。
So, no, you cannot have multiple primary keys. And you don't want it. It would not really make sense. The mere fact that the multiplicity of COLUMN expression in the syntax diagram is 1+ should be enough for you.
你可以在表格中使用复合主键。 检查此链接。 you can use composite primary key in your table. Check this link.
更多推荐
表中的多个主键
发布评论