Comments - Field 'xxxx' doesn't have a default value
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
Thanks Ian... But how can I specify a default value for a field that is primary and auto-increment, such as the customer_id field?
Primary key auto-increments can be made null:
but not given a DEFAULT value, as the AUTO_INCREMENT takes care of that:
You shouldn't get the "Field 'xxxx' doesn't have a default value" error on an auto-increment, so if you are, it would help to find the queries resulting in the problem as well as the table state at the time of these errors.