mySQL表错误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')
);
错误1064:
ERROR 1064:
'Id'char(16)NOT NULL,
在第1行,类型" smallint(6)默认为NULL.
'Id' char(16) NOT NULL,
'Type' smallint(6) DEFAULT NULL, at line1.
我不知道我的桌子有什么问题可以解释吗?
I don't know whats wrong with my table can someone explain?
答
您应将单引号替换为反引号,即`:
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`)
);