I have set the CustomerID to auto-increment but when I try to insert with a statement like: INSERT INTO customerinfo VALUES ("[email protected]", "De Carlo", 19) I get a response saying

Error Code: 1366. Incorrect integer value: 'Bromm' for column 'CustomerID' at row 1

Shouldn't it need a value for the primary key anymore since it's set to auto-increment?

enter image description here

1 Answer 1


Not naming the columns caused MySQL to inject value for Email into the first column CustomerID

You must specify the columns you are inserting

INSERT INTO customerinfo (CustomerEmail,CustomerName)
VALUES ("[email protected]", "De Carlo");

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.