简体   繁体   English

mySQL表错误1064

[英]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: 错误1064:

'Id' char(16) NOT NULL, 'Id'char(16)NOT NULL,
'Type' smallint(6) DEFAULT NULL, at line1. 第1行的'Type'smallint(6)DEFAULT NULL。

I don't know whats wrong with my table can someone explain? 我不知道我的桌子怎么了,有人可以解释吗?

You should replace single quotes with back-ticks ie `: 您应该将单引号替换为反引号,即`:

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 SQLFiddle

Just replace the ' with `. 只需将`替换为`。 Or just remove the '. 或者只是删除“。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM