Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I have table in MySql database want to limit some column value,
is it possible to make a column in table to take specified value such as (value <= 3) ?
CHECK
you need to use a constraint named check which will be defined on table creation and check the value before insert .
CREATE TABLE table_name ( value INT , CHECK(value <= 3) )
Add a comment
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.
CHECKconstraints in MySQL 8.x.