我正在尝试运行以下代码:
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 location
(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
);
答案 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);
希望这能解决问题。