两个主键有可能吗

编程入门 行业动态 更新时间:2024-10-25 17:30:41
本文介绍了两个主键有可能吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在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[^].

更多推荐

两个主键有可能吗

本文发布于:2023-06-08 03:52:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/576144.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:有可能   主键   两个

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!