Add a named CHECK constraint.
Section: Schemas, Tables, and Core DDL
Add check constraint
sql
sql
ALTER TABLE orders ADD CONSTRAINT orders_total_nonnegative CHECK (total_amount >= 0);Explanation
See summary for usage details.
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 Schemas, Tables, and Core DDL