ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

What is the usage of ENUMs in MySQL?

user-image
تم إضافة السؤال من قبل مستخدم محذوف‎
تاريخ النشر: 2013/08/04
Mohamed El Shaer
من قبل 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"

المزيد من الأسئلة المماثلة