How do databases (mySQL if a particular example is important) determine the size of the column needed to store an ENUM?
Is it something simple like a single byte for less than 256 enum options, etc.?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
MySQL Manual says ‘1 or 2 bytes, depending on the number of enumeration values’. If the ENUM has less than 256 possible values, it uses 1 byte, otherwise 2.
See: 10.5. Data Type Storage Requirements