Answer the question
In order to leave comments, you need to log in
In MySQL 5.7, how can I make it so that when a value for an ENUM field (NN) is omitted in insert, an error is generated?
In non-strict and strict mode, if there is no value for an ENUM field (NOT NULL) in insert, then the first numbered member from the list of this ENUM is written to this field.
First, it is very strange that in this context, strict and non-strict modes do not differ. This is fine?
And secondly, how to make it as simple as possible, so that when a value for an ENUM field (NOT NULL) is omitted in insert, an error is generated?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question