do not use numbers as enumeration values
w
字段类型设置错误
有限元的判断,勿用枚举行。
MySQL :: MySQL 5.7 Reference Manual :: 12.4.4 The ENUM Type
https://dev.mysql.com/doc/refman/5.7/en/enum.html
We strongly recommend that you do not use numbers as enumeration values, because it does not save on storage over the appropriate TINYINT
or SMALLINT
type, and it is easy to mix up the strings and the underlying number values (which might not be the same) if you quote the ENUM
values incorrectly. If you do use a number as an enumeration value, always enclose it in quotation marks. If the quotation marks are omitted, the number is regarded as an index. See Handling of Enumeration Literals to see how even a quoted number could be mistakenly used as a numeric index value.
Duplicate values in the definition cause a warning, or an error if strict SQL mode is enabled.