thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Data & Analytics · Foundational

NOT NULL Constraint

A constraint requiring that a column always contains a value.

Definition

NOT NULL rejects inserts or updates that would leave the column empty. Primary key columns are implicitly NOT NULL. Combined with DEFAULT, it guarantees a value is always present.

Example

Email VARCHAR(255) NOT NULL

Exam tip

Adding NOT NULL to an existing column fails if any rows already contain NULLs; backfill those rows first.

Related terms