Column count doesn#39;t match value count at row 1(列数与第 1 行的值数不匹配)
问题描述
所以我阅读了其他帖子,但这个问题是独一无二的.所以这个 SQL 转储文件将此作为最后一个条目.
So I read the other posts but this question is unique. So this SQL dump file has this as the last entry.
INSERT INTO `wp_posts` VALUES(2781, 3, '2013-01-04 17:24:19', '2013-01-05 00:24:19'.
我正在尝试将此值插入表中...
I'm trying to insert this value to the table...
INSERT INTO `wp_posts` VALUES(5, 5, '2005-04-11 09:54:35', '2005-04-11 17:54:35'
它给了我错误,列数与第 1 行的值数不匹配."所以我对列和行如何在这里应用的概念迷失了方向.
it gives me the error, "Column count doesn't match value count at row 1." So I'm lost on the concept of how the column and row apply here.
2781,3
不是指第 2781 行第 3 列吗?5,5
不是指第 5 行和第 5 列吗?
Doesn't 2781,3
mean row 2781 and column 3? And doesn't 5,5
mean row 5 and column 5?
推荐答案
该错误意味着您提供的数据不如表 wp_posts
包含的列多.现在数据库引擎不知道将数据放在哪些列中.
The error means that you are providing not as much data as the table wp_posts
does contain columns. And now the DB engine does not know in which columns to put your data.
要解决这个问题,您必须提供要填充的列的名称.示例:
To overcome this you must provide the names of the columns you want to fill. Example:
insert into wp_posts (column_name1, column_name2)
values (1, 3)
查找表定义,看看您要填充哪些列.
Look up the table definition and see which columns you want to fill.
和 insert
表示您正在插入新的记录.您不是在修改现有的.为此使用 update
.
And insert
means you are inserting a new record. You are not modifying an existing one. Use update
for that.
这篇关于列数与第 1 行的值数不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:列数与第 1 行的值数不匹配


基础教程推荐
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- 带有WHERE子句的LAG()函数 2022-01-01
- 带更新的 sqlite CTE 2022-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01