#1136-列数与第1行的值数不匹配 [英] #1136 - Column count doesn't match value count at row 1

查看:74
本文介绍了#1136-列数与第1行的值数不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用以下查询将ID字段从一个表插入到另一个表:

I am trying to insert ID field from one table to another using below query:

INSERT INTO `srikprag_db`.`acbalance`
SELECT `id` FROM `srikprag_mlm`.`member_table`

显示错误:

#1136-列数与第1行的值数不符

#1136 - Column count doesn't match value count at row 1

此错误的原因是什么?

推荐答案

您没有在SELECT语句的值将保存到的位置上定义目标列,例如.

You did not define the destination column on where the values from the SELECT statement will be saved, eg.

INSERT INTO srikprag_db.acbalance (ID)            -- <<== destination column
SELECT id
FROM   srikprag_mlm.member_table

可能您想在整个数据库中操作记录.

probably you want to manipulate records across database.

这篇关于#1136-列数与第1行的值数不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆