Solved How to connect two primary keys

cheberdy

Member
Local time
Today, 21:08
Joined
Mar 22, 2023
Messages
77
If I have a master table where I have "Autotypes" as primary key and I have a second table with the primary key colors "Colors". I want that an autotype never has a duplicate color, but two different autotypes can have the same color. How do I get this to work?
 
you add another field (long integer) to your second table.
this will serve as it's Foreign Key (refering to your first table, pointing to it's Autotype field.).

the New field should write the Autotype value of the first table.

create a relationship between your tables.
 
If I have a master table where I have "Autotypes" as primary key and I have a second table with the primary key colors "Colors". I want that an autotype never has a duplicate color, but two different autotypes can have the same color. How do I get this to work?
Sorry I forgot, it should then produce all possible records
 

Users who are viewing this thread

Back
Top Bottom