3

I have 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?

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.