how can i get multiple primary keys

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to put three or four primary keys in my policies table but i dont
know how to do it cab someone help me?
 
3-4 PK? Are you sure about your design, normalization?

Anyways, it is very easy! open your table in design mode. Press and hold
the shift key and using your mouse select the fields to make PK out of.

You should now have 3-4 rows highlighted.

Right-click using the mouse (you still haven't let go of the shift key) and
select Primary Key.
 
romona26 said:
I am trying to put three or four primary keys in my policies table
but i dont know how to do it cab someone help me?

A table can have exactly one Primary Key.

If what you meant to say is that you want your one PK to consist of multiple
fields then hold shift or control so you can select multiple fields before
pressing the "key" in the toolbar.
 
And just for your knowledge, if you do what Daniel and Rick have suggested
and create a primary key out of multiple fields the terminology, for your
future reference, is

COMPOSITE KEY


--
Bob Larson
Access World Forums Super Moderator
Utter Access VIP
Tutorials at http://www.btabdevelopment.com
__________________________________
If my post was helpful to you, please rate the post.
 
If you aren't looking for a composite primary key made out of multiple
fields, but rather, three or four fields that are each unique, you could make
each individual field a unique index. However that would lead me to believe
that Daniel is correct about your data not being properly normalized. More
likely you need 3 or 4 tables to store the unique data.
 
Back
Top