I get the following error:
ERROR 1064 (42000) at line 5: You have an error in your SQL syntax:
Check the manual that corresponds to your MySQL server version for
the right syntax to use near 'ADD INDEX idx_latitude (latitude)
ADD INDEX idx_longitude (longitude)
ADD INDEX ' at line 21
My code where I attempt to create these indexes:
CREATE TABLE allCountries (
geonameid int(15) PRIMARY KEY,
name varchar(200),
asciiname varchar(200),
alternatenames varchar(4000),
latitude decimal(11,7),
longitude decimal(11,7),
fclass char(1),
fcode varchar(10),
country varchar(2),
cc2 varchar(60),
admin1 varchar(20),
admin2 varchar(80),
admin3 varchar(20),
admin4 varchar(20),
population int(15),
elevation int(15) NULL,
gtopo30 int(15),
timezone varchar(40),
moddate date
ADD INDEX idx_latitude (latitude),
ADD INDEX idx_longitude (longitude),
ADD INDEX idx_fclass (fclass),
) CHARACTER SET utf8;
Can someone point me in the right direction please?
I have tried to use ; after the brackets, which also did not help.