Database new error code: 1136 Column count doesn ' t match value count at row 1__ database

Source: Internet
Author: User
Tags sql error

Today in the test, a few new test data, but has been the SQL error, is clearly the previous rules, and add such a simple SQL

Error: 1136 Column count doesn ' t match value count at row 1

The Internet to check the information that this error is "inserted data and table column number does not match",

My SQL statement is in addition to the ID all inserted,

INSERT into Test VALUES (1,1,1,1,1,1,1,2); Table has 9 fields, I use the MySQL database, the ID field set the default growth

Before inserting this is OK, he said I am not the right number, I will add the ID, into:

INSERT into Test VALUES (9,1,1,1,1,1,1,1,2);

This is still an error.

No way, or do not have to insert the whole item, I changed into a

INSERT into (a,b,c,d,e,f,g,h,i) test VALUES (1,1,1,1,1,1,1,2);

It finally worked.

No longer lazy, even if the test must be serious to do.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.