本文介绍了两个主键有可能吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在SQL2005中创建了一个带有两个主键字段的表,当时我提议要建立一个表,但发生错误,表中的两个主键是否有可能?
i create one table with two primary key fields in SQL2005, whn i proposed to build the table a error is occured, is there any posiblity for two primary key in a table?
推荐答案编号 一个表必须只有一个主键. 您可以根据需要拥有任意数量的辅助键,但是只有一个主键. No. A table must have one, and only one, primary key. You can have as many secondary keys as you need, but only the single primary.
您只能有一个主键.如果要使用两个不同的列,可以查看复合/复合键 [ ^ ]. You can only have one Primary Key. If you want to use two different columns, you can have a look at Composite/Compound Key[^].
更多推荐
两个主键有可能吗
发布评论