Add a CHECK constraint using ALTER
SQL
Medium
3 views
Problem Description
In Products, price must be >= 1. Add a CHECK constraint.
Output Format
DDL statement(s)
Constraints
Assume table exists
Official Solution
ALTER TABLE Products ADD CONSTRAINT chk_price_min CHECK (price >= 1);
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!