Why ENUM

suggest change

ENUM stores one value from a short list of strings. MySQL keeps the list index, not a separate lookup table. A small set of non-numeric options works best. In non-strict mode an invalid value becomes ''. Strict SQL mode rejects it. Examples:

reply ENUM('yes', 'no')
gender ENUM('male', 'female', 'other', 'decline-to-state')

The values are strings:

INSERT ... VALUES ('yes', 'female')
SELECT ... --> yes female

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents