# Primary Key

*noun*

say it: **“PRY-mair-ee KEE”** **/ˈpraɪmɛri kiː/**

A column, or columns, whose value is unique for every row and identifies it, such as ProductID.

## What is **Primary Key** in a relational database?

**Primary Key** — The chosen candidate key that uniquely identifies every row and cannot contain NULL.

```sql
CREATE TABLE customer (
    customer_id INTEGER PRIMARY KEY,
    email CHARACTER VARYING(255) NOT NULL,
    status CHARACTER VARYING(20) DEFAULT 'active'
);
```

## In a sentence

- “ProductID is the **primary key**, so no two products can share an id.”

Level: Novice · [More Database terms at this level](https://www.ask-codey.com/glossary?category=database&level=1)

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/primary-key
