Tuesday, 2 June 2015

What are the differences between foreign, primary, and unique keys

While unique and primary keys both enforce uniqueness on the column(s) of one table, foreign keys define a relationship between two tables.
A foreign key identifies a column or group of columns in one (referencing) table that refers
to a column or group of columns in another (referenced) table.