57.2k views
1 vote
If the ID field in one table is a primary key and is defined as AutoNumber (long integer), what should be the field type and size of its foreign key field in another table?

1 Answer

4 votes

Final answer:

The foreign key field in another table that references an AutoNumber (long integer) primary key should also be of the long integer field type to ensure the foreign key matches the primary key exactly.

Step-by-step explanation:

If the ID field in one table is a primary key and is defined as AutoNumber (long integer), the field type of its foreign key field in another table should also be a long integer. This ensures data integrity, as the foreign key must exactly match the data type and size of the primary key it references. Typically, no other properties like AutoNumber should be set on the foreign key, because it will be receiving its values from the primary key field of the related table.

User Audi
by
9.1k points