Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

What is the usage of ENUMs in MySQL?

user-image
Question ajoutée par Utilisateur supprimé
Date de publication: 2013/08/04
Mohamed El Shaer
par 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