導入數據時有錯誤
来源:2-4 将表的结构导入数据库中
大T
2018-12-18
#用户表 CREATE TABLE o2o_user( id int(11) unsigned NOT NULL auto_increment, username varchar(100) NOT NULL DEFAULT ‘’, password char(32) NOT NULL DEFAULT ‘’, code varchar(10) NOT NULL DEFAULT ‘’, last_login_ip varchar(20) NOT NULL DEFAULT ‘’, last_login_time int(11) unsigned NOT NULL default 0, email varchar(30) NOT NULL DEFAULT ‘’, mobile varchar(20) NOT NULL DEFAULT ‘’, listorder int(8) unsigned NOT NULL default 0, status tinyint(1) NOT NULL DEFAULT 0, create_time int(11) unsigned NOT NULL default 0, update_time int(11) unsigned NOT NULL default 0, PRIMARY KEY (id), UNIQUE KEY username(username), UNIQUE KEY email(email), )ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8
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 ‘)ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8’ at line 19
1回答
-
singwa
2018-12-19
同学您好:
UNIQUE KEY email(email), 这个这个地方多了一个逗号, 去掉再试试把。
00
相似问题