Combining tow fields to make a primary key

Jeanette

Registered User.
Local time
Today, 12:23
Joined
Dec 17, 2001
Messages
52
Hello all, I have a table with two fields set as primary keys to form a unique identification. I want to use these fields as a lookup column in another table and be able to enforce referential integrity. I tried doing the lookup field using only on of the primary keys, and I cannot enforce referential integrity. Can any tell how to get referential integrity by using both of my primary keys? Thanks in advance.
 
If you need to use this table as a lookup, it will be easier if you use an autonumber as the primary key and create a unique index on the two fields to enforce the business rules. You would also use the autonumber field as the foreign key.

There is no problem using multi-field primary keys or in enforcing RI on relationships to these tables. The only awkwardness is if you need to use them in a combo.
 

Users who are viewing this thread

Back
Top Bottom