Checking Existing Data when Creating a Relationship

See Also

Select the option to check existing data when you create a relationship if the foreign key constraint should apply to existing data as well as to new data.

Note   Some databases have different functionality for foreign key constraints. For more information about the differences between databases, see Database Server Considerations. Consult your database documentation for details about how your database works with foreign key constraints.

To check existing data when creating a relationship

  1. In your database diagram, select the table that the foreign key constraint is attached to.

  2. Right-click the table and select Properties.

  3. Choose the Relationships tab.

  4. Select the relationship from the Selected relationship list.

  5. Select the Check existing data on creation check box.

This option is not selected by default. The foreign key constraint is applied when you save the table or diagram. If any constraint violations are encountered during the save process, the table cannot be saved.