Question

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 don't know whats wrong with my table can someone explain?

Était-ce utile?

La solution

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

Autres conseils

Just replace the ' with `. Or just remove the '.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top