错误1064(42000):未知列

时间:2016-07-21 12:23:54

标签: mysql-error-1064

我正在尝试运行以下代码:

CREATE TABLE IF NOT NOT EXISTS location( locationId int(10)NOT NULL, locationName varchar(25)NOT NULL, 主要关键(locationId) )ENGINE = InnoDB DEFAULT CHARSET = latin1;

运行以下代码时出错:

INSERT INTO locationlocationIdlocationName)VALUES (1,Millwall Park-London), (2,Isle of Dogs), (3,Windsor Castle-Grounds), (4,Orford Ness-Suffolk), (5,Rancid Attic Studio), (6,St James Park-London);

1 个答案:

答案 0 :(得分:0)

使用引号:

INSERT INTO位置(locationId,locationName)VALUES(1," Millwall Park-London"),(2," Isle of Dogs"),(3," Windsor Castle-Grounds"),(4," Orford Ness-Suffolk"),(5," Rancid Attic Studio"),(6," St James Park -London&#34);

希望这能解决问题。