What is a foreign key constraint?

A foreign key constraint requires that the values in one or more columns in a global or central table must have a corresponding primary key value in the same or another table.

A foreign key constraint enforces the validity of column values, so that any attempt to insert or update rows which would violate a referenced primary key are prevented.

Creating a foreign key constraint both defines the foreign key and enforces it.

There can be multiple foreign key constraints defined per table.

Have more questions? Submit a request

Comments

Article is closed for comments.

Powered by Zendesk