Primary keys to allow duplicates? (1 Viewer)

nick2price

Registered User.
Local time
Today, 08:06
Joined
Sep 24, 2008
Messages
14
is there any way to allow primary keys to allow duplicates?
 
is there any way to allow primary keys to allow duplicates?

Why would you need to do that? The whole purpose of a Primary Key is to provide a Unique reference ID for each item in a table. If you need a potentially repeating ID, then a field other than the Primary Key should be used.
 
Contradiction in terms. Primary Keys, BY DEFINITION, must uniquely select either zero or one record. If it selects more than one record, it ain't primary.

A compound primary key can be constructed that includes two fields such that the combination is unique, but the individual fields could each be Duplicates Allowed.
 

Users who are viewing this thread

Back
Top Bottom