SQL报错:Column count doesn't match value count at row 1
程序员文章站
2022-04-16 10:26:12
...
Column count doesn’t match value count at row 1 意思是:列数与第1行的值数不匹配
比如:person表中有4个字段(id,name,pwd,gender),其中id为自增主键
情况1:
insert into person values (value1,value2, value3)
在insert时,省略数据库表的列名,则默认为所有列。所以表字段的列数为4,而值的列数为3,不匹配。
情况2:
insert into person(name, pwd, gender) values (value1 value2, value3)
在列于列之间写少了,
分隔符,粒如上面的value1 和 value2之间没写,
分隔符,造成表字段的列数为3,而值的列数为2,不匹配。
我犯的就是这个错误!
上一篇: php设计模式-策略模式
推荐阅读
-
Column count doesn't match value count at row 1_MySQL
-
Column count doesn't match value count at row 1_MySQL
-
ç»è®°é¡µé¢åºç°Column count doesn't match value count at row 1
-
Column count doesn't match value
-
Column count doesn't match value_PHP教程
-
Column count doesn't match value
-
注å页é¢åºç°Column count doesn't match value count at row 1
-
注å页é¢åºç°Column count doesn't match value count at row 1
-
SQL报错:Column count doesn't match value count at row 1
-
ERROR 1136 (21S01): Column count doesn't match value count at row 1