AI engineering glossary · SQL databases

What is CHECK (check constraint)?

Check constraint (also called CHECK): A rule that attaches a true-or-false condition to a column or row; any insert or update that makes the condition false is rejected. It enforces business limits directly in the database.

Level: intermediateTopic: SQL databases

Check constraint: an example

CHECK (rating BETWEEN 1 AND 5) rejects a review with rating 7.

Related terms

More SQL databases terms

Where you learn it

Check constraint is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.