CREATE TABLE myCTGlobalFootprint (
geoID INT NOT NULL AUTO_INCREMENT,
geoName VARCHAR(20) NOT NULL,
PRIMARY KEY (geoID)
);
INSERT INTO myCTGlobalFootprint
(geoName)
VALUES
('Canada'),
('United States'),
('Europe'),
('International Misc.');
它在第15行引发错误......任何见解都会得到极大的认可!!
答案 0 :(得分:0)
使用UNION
之类的:
INSERT INTO myCTGlobalFootprint (geoName)
select 'Canada'
UNION
select 'United States'
UNION
select 'Europe'
UNION
select 'International Misc.';
否则你必须编写四个INSERT INTO
语句,如:
INSERT INTO myCTGlobalFootprint(geoName) VALUES('Canada');
INSERT INTO myCTGlobalFootprint(geoName) VALUES('United States');
INSERT INTO myCTGlobalFootprint(geoName) VALUES('Europe');
INSERT INTO myCTGlobalFootprint(geoName) VALUES('International Misc.');