Access foreign key not updating

Rated 3.91/5 based on 755 customer reviews

If an attempt is made to delete the row in a primary key table or to change a primary key value, the action will fail when the deleted or changed primary key value corresponds to a value in the foreign key constraint of another table.To successfully change or delete a row in a foreign key constraint, you must first either delete the foreign key data in the foreign key table or change the foreign key data in the foreign key table, which links the foreign key to different primary key data.

Product Vendor table form a composite primary key constraint for this table.

However, manually creating an index on a foreign key is often useful for the following reasons: Although the main purpose of a foreign key constraint is to control the data that can be stored in the foreign key table, it also controls changes to data in the primary key table.

For example, if the row for a salesperson is deleted from the Sales.

By creating this foreign key relationship, a value for Sales Person ID cannot be inserted into the Sales Order Header table if it does not already exist in the Sales Person table.

A table can reference a maximum of 253 other tables and columns as foreign keys (outgoing references).

Leave a Reply