# Primary Key

The chosen candidate key that uniquely identifies every row and cannot contain NULL.

## 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'
);
```

Level: Novice · [More Database terms at this level](https://www.ask-codey.com/glossary/subjects/database/novice)

Updated: September 27, 2026

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