ENUMs in MySQL
What are ENUMs used for in MySQL?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Arjun PanwarPosted Dec 8, 2011, 1:05 AM
Priya LingePosted Dec 8, 2011, 12:28 AM
1.Using Enum can restrict the number of values that can be allowed to go inside a table.
ENUM is used to limit the values that persist in the table.
2.Example :
A> ENUM for Colors ENUM('blue','yellow','green')
We can use an insert statement like Insert colors values ('red').
B>CREATE TABLE months (month ENUM 'January', 'February', 'March',);
INSERT months VALUES ('April');
Please check below link .
http://www.mysqlfaqs.net/mysql-faqs/Data-Types/What-are-ENUM-and-SET-Data-Types-in-MySQL
Hope this will help you.
Thanks.