MySQL插入错误代码1136

时间:2017-06-30 03:06:14

标签: mysql insert insert-into

我在MySQL Workbench 我已经创建了一个表,现在想要插入数据,但MySQL说,“错误代码:1136列数与第1行的值计数不匹配”,这有点令人困惑。

请有人可以提供建议。

CREATE table 05FinancialForecast
(
ID INT,
Username VARCHAR (12),
Region VARCHAR (12),
ProductGroup VARCHAR (25),
Product VARCHAR (25),
Customer VARCHAR (30),
SalesRep VARCHAR (20),
ProductLine VARCHAR (15),
TransactionDate DATE, 
TransactionCode TEXT,
Units SMALLINT,
CountryCode VARCHAR(4),
GlobalUnit SMALLINT,
SALES SMALLINT,
2017Forecast SMALLINT,
2018Forecast SMALLINT,
2019Forecast SMALLINT,
2020Forecast SMALLINT,
2021Forecast SMALLINT,
2022Forecast SMALLINT,
2023Forecast SMALLINT,
2024Forecast SMALLINT,
2025Forecast SMALLINT,
2026Forecast SMALLINT,
2027Forecast SMALLINT,
2028Forecast SMALLINT
)



INSERT INTO 05financialforecast
(
ID, Username, Region, ProductGroup, Product, Customer, SalesRep, ProductLine, TransactionDate, TransactionCode,
Units, CountryCode, GlobalUnit, SALES, 2017Forecast ,2018Forecast, 2019Forecast, 2020Forecast, 2021Forecast,
2022Forecast, 2023Forecast, 2024Forecast, 2025Forecast, 2026Forecast, 2027Forecast, 2028Forecast 
) Values


(1,
"Shrik1",
"West",
"Freestyle",
"Carlota",
"BFGM company",
"Phlem",
"Beginner",
"01-05-2015",
"421251FreestyleWestPhlem",
20,
"AFG",
500,10000,250,23000,23500,24000,24500,25000,25500,26000,26500,27000,27500,28000,28500);

1 个答案:

答案 0 :(得分:0)

您正在为26列输入27个值。