"Column count doesn't match value count at row" but it does

I faced a similar problem because of inserting parenthesis around data :-(:

INSERT INTO Customers (Name,LastCredit,CreditDate) VALUES ( <-- Here.
    ("Nuclear Millitary Systems",500.0,CURRENT_DATE),
    ("Evil Corporation",67890.95,"2012-02-12"),
    ("Nuke Software Systems",5600.0,"2013-05-06"),
    ("RR Millitary",600.0,"2013-05-06"),
    ("Random Automation",560.0,"2012-05-01"),
    ("Evil Data Systems",600.0,"2013-03-01")
  ); 

I was facing a similar error. It was just the matter of a missing comma. Check if all the items in the insert statement are separated by commas


In my case, my database table has a trigger associated to another table, and there was one column missing in triggered table. Something like this:

Table1 columns: UserAccountID, Document type, permissions, Status

Triggered Table 2 columns: Revision number, Revision Status, UserAccountID, Permissions, Status

So in the table 2, "document type" column was missing. Check the triggers in the DB by

"show triggers from {Database Name}"

Tags:

Mysql

Count