Duplicates and Primary Keys

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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.
 
Back
Top