为什么会出现错误#1136-列计数与​​第1行的值计数不匹配? [英] Why am I getting error #1136 - Column count doesn't match value count at row 1?

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

问题描述

我收到此错误:

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

当我尝试这样做时:

INSERT INTO folding_cartons 
(part_no, description, count, size, pdf_link, min, max, current) 
VALUES ('240-63100-00’,‘YB MV Cherry’, ‘90’,‘3 x 2-11/16 x 5-5/64’,
‘http://www.logicpkg.com/data/hero/copies/240-63100-00.pdf','0','0','0')

错误是什么意思?

推荐答案

这是我的建议.我使用SET来插入,而不是使用通用的方式来命名列及其值.这很容易理解,您知道哪一列有内容.另外,将其更改为UPDATE非常简单,因为它具有相同的结构(只需将INSERT INTO更改为UPDATE并添加WHERE子句即可.)

Here's what I suggest. I use the SET to insert instead of the common way to naming columns and them values. It is very simple to understand and you know which column has what. Also, to change this into an UPDATE is very simple since it's the same structure (just change the INSERT INTO to UPDATE and add a WHERE clause).

INSERT INTO `folding_cartons` SET 
 `part_no` = '240-63100-00', 
 `description` = 'YB MV Cherry', 
 `count` = 90,
 `size` = '3 x 2-11/16 x 5-5/64', 
 `pdf_link` = 'http://www.logicpkg.com/data/hero/copies/240-63100-00.pdf', 
 `min` = 0, 
 `max` = 0, 
 `current` = 0;

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

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