当我尝试创建表时,出现Mysql 1064(4200)错误

时间:2014-03-09 06:27:52

标签: mysql

-CREATE TABLE accesslogs (
page VARCHAR(250) NOT NULL,
userid VARCHAR(8) BINARY NOT NULL,
visitcount MEDIUMINT(5) DEFAULT 0 NOT NULL,
accessdate TIMESTAMP(14),
PRIMARY KEY (userid, page));

从命令行按Enter键后显示错误:

-ERROR 1064 (4200): 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 '(14), PRIMARY KEY (userid, page)'
at line 5.

每次在刷新权限后尝试创建表时,都会继续发生此错误。

请帮忙。

由于

1 个答案:

答案 0 :(得分:2)

变化:

accessdate TIMESTAMP(14),

accessdate TIMESTAMP,

TIMESTAMP数据类型没有大小选项。