Sunday, 21 May 2017

What is foreign key in MySQL?

A foreign key is a reference to a primary key in another table or the table itself. It is used for what is called referential integrity. It can be a field (or a set of fields) in a table that uniquely identifies a row of another table. The table in which the foreign key is defined is called the “child table” and it (often) refers to the primary key in the parent table

No comments:

Post a Comment