# NOT NULL Constraint

A constraint requiring a column to contain a non-NULL value.

## What does **NOT NULL Constraint** do in a relational database?

**NOT NULL Constraint** — A constraint requiring a column to contain a non-NULL value.

```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/not-null-constraint
