Duplicates and Primary Keys

G

Guest

I am trying to create a primary key in a table, but I want to allow the
primary key to have dublicate entries. When I set the entry to allow
Duplicate entries, the field is re-defined to exclude duplicate entries when
I attempt to make the field a primary key. Is there any way to have a primary
key that allows for duplicate entries to exist?
--
Thank You,

Stephanie Rubino
Intern
Viatronix, Inc.
 
G

Guest

Hi,

In a word: No.

By definition a primary key may not have a duplicate value. Primary keys
MUST be unique.

Now it is possible, but I don't recommended it, to have a primary key
comprised of more than one field. This is known as a composite primary key.
Then it's possible for there to be duplicate data within a field; however,
the combination of all the fields in the primary key must still be unique.

Also you may have duplicate foriegn keys. Possibly you are looking at your
table relationships backwards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top