-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.
每次在刷新权限后尝试创建表时,都会继续发生此错误。
请帮忙。
由于
答案 0 :(得分:2)
变化:
accessdate TIMESTAMP(14),
到
accessdate TIMESTAMP,
TIMESTAMP
数据类型没有大小选项。