Multiple Primary Keys?

You can have composite primary keys. You can have a primary key and a secondary index. But, you can't have two primary keys.

The University of Texas keeps track of each student's SSN and EID. The SSN was (and may still be) the primary key field that is used to uniquely identify student records, link course grade records, keep track of parking ticket records, etc. The EID field is a field that is now used by UT in printed reports, online grades, etc. Only one of these fields is the true primary key of the student table. The other is just a data field.

More FAQs