MySQL 5.6.13没有正确执行create table

时间:2014-07-08 14:24:45

标签: mysql sql nitrousio

我有以下SQL在MySQL 5.6.13实例上创建表:

CREATE TABLE 'exchange' ( 
'id' int NOT NULL AUTO_INCREMENT, 
'abbrev' varchar(32) NOT NULL, 
'name' varchar(255) NOT NULL, 
'city' varchar(255) NULL, 
'country' varchar(255) NULL, 
'currency' varchar(128) NULL, 
'time_zone_offset' time NULL, 
'created_date' datetime NOT NULL, 
'last_updated_date' datetime NOT NULL, 
PRIMARY KEY ('id') 
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;  

但是,我一直收到以下无用的错误:

ERROR 1064 (42000): 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 
''exchange' ( 'id' int NOT NULL AUTO_INCREMENT, 
'abbrev' varchar(32) NOT NULL, 'n' at line 1  

我一定错过了一些明显的东西......

我出错的任何想法?

2 个答案:

答案 0 :(得分:1)

尝试:

CREATE TABLE exchange ( 

价: http://dev.mysql.com/doc/refman/5.1/en/create-table.html

答案 1 :(得分:0)

删除所有引号,这有助于我在Windows机器命令行