I've got a problem figuring out how to get a Foreign Key in one table to automatically coinside to the value of its Primary key in another. Here's what I'm getting at:
Table 1 has a Primary Key of Company_id
Table 2 has a Primary Key of Office_id and a foreign key of Company_id(related from table 1) Now I can't figure out how to get the FKEY of table2.Company_id to automatically contain the same value as the PKEY table1.Company_id.
I'm going to be inserting, updating, and deleting records. One company can have many offices but I can't figure out how to get them related. I hope this is enough info for someone to understand my problem. Thanks.