user3565757 user3565757 - 4 months ago 16
MySQL Question

mySQL Table ERROR 1064

CREATE TABLE 'geodata' (
'Id' char(16) NOT NULL,
'Type' smallint(6) DEFAULT NULL,
'Description' varchar(200) DEFAULT NULL,
'Url' varchar(400) DEFAULT NULL,
'Location' point DEFAULT NULL,
PRIMARY KEY ('Id')
);



ERROR 1064:

'Id' char(16) NOT NULL,
'Type' smallint(6) DEFAULT NULL, at line1.



i dont know whats wrong with my table can someone explain thank you!

Answer

You should replace single quotes with back-ticks i.e `:

CREATE TABLE `geodata` (
 `Id` char(16) NOT NULL,
 `Type` smallint(6) DEFAULT NULL,
 `Description` varchar(200) DEFAULT NULL,
 `Url` varchar(400) DEFAULT NULL,
 `Location` point DEFAULT NULL,
  PRIMARY KEY (`Id`)
); 

SQLFiddle