SQL Keys

Primary Key #

Column that uniquely identifies records in the table.

Requirements:

  • Can’t be null

  • Must be unique

  • One primary key per table

Foreign Key #

Instance where a primary key appears in another table, usually with a more descriptive name suggesting which table the foreign key relates to.