What is foreign key in database?

By Arsal Ahmed   Posted on March-20-2018   523

A foreign key is a column or group of columns in a relational database table that provides a link between data in two tables and it acts as a cross reference between tables. Because it references the primary key of another table and thereby establishing a link between them.

  • The foreign shows relationship between two tables.
  • When the primary key is inserted in first table and when the first table connects with the second table in database.
  • Then the relationship shows the link between the two tables in sql server.

By Arsal Ahmed    20-Mar-2018 Views  523



You may also read following recent articles