MySQL ENUMs - June 18, 2009 at 15:00 pm by Rajmeet Ghai
What are ENUMs used for in MySQL?
Answer
Using Enum can restrict the number of values that can be allowed to go inside a
table. If there is an ENUM for Colors ENUM(‘blue’,’yellow’,’green’) I can use
an insert statement like Insert colors values (‘red’).
MySQL ENUMs - September 30, 2009 at 18:00 pm by Vidya Sagar
What are ENUMs used for in MySQL?
ENUM is used to limit the values that persist in the table. The following
example illustrates the best use of ENUM.
CREATE TABLE months (month ENUM ‘January’, ‘February’, ‘March’,);
INSERT months VALUES (’April’);
More MySQL Links
|