尝试将.sql文件导入MySQL时,我遇到了这个重复出现的问题,这是我得到的 错误 SQL查询:
CREATE TABLE `ADMINS` (
`id` int(11) NOT NULL auto_increment,
`client_id` varchar(80) NOT NULL default '',
`client_pw` varchar(16) default NULL,
`client_school` varchar(16) default NULL,
`client_expdate` date default '0000-00-00',
`client_fullname` varchar(50) default NULL,
`webinfo` mediumtext,
`webinfodate` date default NULL,
`LastUpdate` timestamp(14) NOT NULL,
`user_activation_key` varchar(60) default NULL,
`user_email` varchar(100) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=2 ;
MySQL说:
#1064 - 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) NOT NULL,
`user_activation_key` varchar(60) default NULL,
`user_email' at line 10
答案 0 :(得分:3)
时间戳没有长度。变化:
timestamp(14)
到
timestamp
答案 1 :(得分:0)
语法不正确,正如John指出的那样,您不需要timestamp
数据类型的长度。另外,{@ 1}}已弃用,现在已type=myisam
。
engine=myisam