Restrict column values with a boolean rule.
Section: Constraints and Indexes
Add check constraint
sql
sql
ALTER TABLE products
ADD CONSTRAINT chk_price_positive CHECK (price >= 0);Explanation
CHECK constraints enforce domain rules inside the database.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Constraints and Indexes