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

前端 未结 7 1731
我在风中等你
我在风中等你 2020-12-30 00:11

I\'ve got a mysql file with over than 14000 statements. All of them are inserts into a table, and when I import the file using console, it throws the following error:

<
7条回答
  •  梦谈多话
    2020-12-30 00:46

    In my case it was the number of "?" in the prepared statement

    prepare stmt1 from  "insert into company (name, address, phone) values(?,?);";
    /*note only 2 question marks which should be 3.*/
    

    This also will trigger the same error

    insert into company (name, address, phone) values('foo','bar');
    

提交回复
热议问题