开发者

enum problem in mysql field

开发者 https://www.devze.com 2023-03-03 13:05 出处:网络
I hav开发者_如何学Ce added a new enum column, enum(\'true\',\'false\') in an existing MySQL table.What I am getting is whole table default enum field \'true\' as default value.I haven\'t set anything

I hav开发者_如何学Ce added a new enum column, enum('true','false') in an existing MySQL table. What I am getting is whole table default enum field 'true' as default value. I haven't set anything default, why is this happening?


From the MySQL manual:

If an ENUM column is declared to permit NULL, the NULL value is a legal value for the column, and the default value is NULL. If an ENUM column is declared NOT NULL, its default value is the first element of the list of permitted values.

0

精彩评论

暂无评论...
验证码 换一张
取 消