MySQL错误1064不能解决问题

MySQL错误1064不能解决问题

问题描述:

在数据库中正确创建的所有表格中,下面的表格让我发狂,不能得到它!MySQL错误1064不能解决问题

我将非常感谢您的帮助,破译错误。

"DROP TABLE IF EXISTS `content_pages`;", 

"CREATE TABLE content_pages (
    id int(10) NOT NULL auto_increment, 
    category int(10) NOT NULL default '0', 
    title varchar(200) NOT NULL default '', 
    page blob NOT NULL, 
    page_type varchar(20) NOT NULL default '', 
    display_in_theme int(5) NOT NULL default '0', 
    html_header int(5) NOT NULL default '0', 
    reads int(10) NOT NULL default '0', 
    PRIMARY KEY (id) 
) ENGINE = MyISAM;", 

错误报告:

Database Queries 
Query: CREATE TABLE content_pages (id int(10) NOT NULL auto_increment, category int(10) NOT NULL default '0', title varchar(200) NOT NULL default '', page blob NOT NULL, page_type varchar(20) NOT NULL default '', display_in_theme int NOT NULL default '0', html_header int NOT NULL default '0', reads int NOT NULL default '0', PRIMARY KEY (id)) ENGINE = MyISAM; 
Error: 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 'reads int NOT NULL default '0', PRIMARY KEY (id)) ENGINE = MyISAM' at line 9 

注:

我试图消除INT(5)的和INT(10)的引用;也没有工作。

+2

'reads'是在MySQL https://dev.mysql.com/doc/refman/5.5/en/reserved-words.html –

readsreserved keyword in MySQL,需要通过反引号进行转义。

`reads` int(10) NOT NULL default 0, 
+0

大部分有义务克林斯曼保留字, –