beginner
Check Constraint
4 min readLast updated: 2026-07-23
Overview
A CHECK constraint enforces domain integrity by validating that values inserted into a column satisfy a boolean condition.
Code Examples
SQL
sql
CREATE TABLE products (
product_id INT PRIMARY KEY,
price DECIMAL(10,2) CHECK (price >= 0.0)
);
Summary
CHECK constraints restrict column values to valid domain ranges.