CHECK

A constraint that each row must satisfy a condition, such as quantity > 0 or a status from a fixed list.

In more detail

The database refuses any insert or update that makes the condition false. It protects allowed values at the source, whichever program does the writing.

Example

status TEXT NOT NULL CHECK (status IN ('paid', 'pending', 'refunded'))

Related terms

Taught in

References