Uniquely identifies every row in a relational table, using one column or several together. A foreign key in another table holds this value to reference the row.
Read more: Microsoft Learn
In the Ultra Transcenders books
Each book explains Primary key in context, with comparison tables and the common traps.
Terms in this definition
- Relational table
The table used by relational databases to hold structured data: all rows share the same columns, each column has a set data type, and individual values may be left empty (NULL).
- FK
Short for foreign key: a column pointing at the primary key of a different table. Azure Databricks treats both key constraint types as information only and does not enforce them.
- Event
Table in Log Analytics where entries from Windows event logs are kept.
Related terms
- Change tracking
A lightweight SQL feature that records, as part of each change, which rows were affected (their primary key, the operation and, optionally, the columns) without keeping old values. Readers call
CHANGETABLEand then fetch the current rows themselves. - Foreign key
Ties two tables together by storing, in a column of one, the primary key values of matching rows in the other; referential integrity can then be enforced by the database.
- JOIN
Combines rows from two or more tables in one SELECT, most often by pairing a primary key with the foreign key that refers to it.
- RDBMS
Relational database management system. This software runs the database and can normally enforce referential integrity, so that an unmatched foreign key value (one pointing to no existing primary key) is refused.
- UNIQUE constraint
A rule preventing repeated values in a column, or combination of columns, other than the primary key; a unique index enforces it. A single NULL is permitted, which a primary key does not allow.