MySQL: ENUM Datatype

Today I discovered that MySQL has a data type which is an ENUM. It allows you to define up to 2^16 or 65536 different values. The peculiarity is that you can define a set of values such as “status” => “pending”, “wip”, “done”, and MySQL itself converts them into values 1, 2, 3... Important: the values start at 1 and not 0. Note that it can have either a DEFAULT value or it can be NULL and in this case, if it is not defined, the field value will be NULL.
Read more