Skip to content

Glossary: SQL Beyond the Basics

Constraint

Also written: constraints

A rule the database enforces on every INSERT and UPDATE, such as NOT NULL, UNIQUE, CHECK or a foreign key. It stops bad data getting in.

Where the book teaches it

Related terms

NOT NULLUNIQUECHECK constraintDEFAULTForeign key