简体   繁体   English

MS Access 2003中的组合键

[英]Composite Key in MS Access 2003

Question 1: And how to create two fields as primary keys(Attribute A is primary key and Attribute B is primary key) 问题1:以及如何创建两个字段作为主键(属性A是主键,属性B是主键)

Question 2: How to create composite key(Attribute A and B together as primary key) 问题2:如何创建组合键(属性A和B一起作为主键)

In MS Access 2003. 在MS Access 2003中。

Thanks in Advance.. 提前致谢..

尽管您不能创建2个主键,但是可以将索引设置设置为“ Yes (无重复)”,这将防止输入2个相同的条目,并且可以提供更快的搜索速度。

You can select both fields, hold the shift key and then right click and choice primary key. 您可以选择两个字段,按住Shift键,然后右键单击并选择主键。 This will make both keys primary key. 这将使两个键成为主键。 Meaning the combination must always be unique, and I guess this should answer both questions. 这意味着组合必须始终是唯一的,我想这应该回答两个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM