Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What is the usage of ENUMs in MySQL?

user-image
Question added by Deleted user
Date Posted: 2013/08/04
Mohamed El Shaer
by Mohamed El Shaer , Senior System Engineer , Etisalat UAE

ENUM and SET are similar datatypes which is used to make a predefined choices to select value(s) among them to be stored on the database Example ENUM('Male','Female') , this filed can carry the value of 'Female' or 'Male' ONLY and not any other value, so you can select one value from the predefined values "Suitable for HTML Radio Buttons" SET is the same as ENUM but you can choose any number of values you want, Example: SET('Football','Basketball','Tennis','Handball'), you can any values you want and it will be stored on the database as a string of comma separated values. "Suitable for HTML Checkboxes"

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.