【发布时间】:2015-09-06 11:29:23
【问题描述】:
我只是找不到这段代码有什么问题......
connection.query('CREATE TABLE posts (postid int NOT NULL AUTO_INCREMENT, posttitle varchar(255) NOT NULL, postdate datetime NOT NULL, deleted boolean, ownerid int PRIMARY KEY (postid) )');
我得到了错误
Error: ER_PARSE_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 '(postid) )' at line 1
我使用 node 和 mysql npm 模块。请帮忙。
【问题讨论】: