在Navicat for MYSQl运行sql文件错误
mydb.sql文件内容如下:
CREATE TABLE users(
users int(11) NOT NULL default '0',
PASSWORD varchar(50) NOT NULL default '',
NAME varchar(50) NOT NULL default '',
SEX varchar(50) default NULL,
BIRTH bigint default NULL,
DESCRIPTION varchar(256) default NULL,
);
在Navicat for MYSQl运行mydb.sql包错:
[Err] 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 ')' at line 8
[Err] CREATE TABLE users(
users int(11) NOT NULL default '0',
PASSWORD varchar(50) NOT NULL default '',
NAME varchar(50) NOT NULL default '',
SEX varchar(50) default NULL,
BIRTH bigint default NULL,
DESCRIPTION varchar(256) default NULL,
);
[Msg] Finished - Unsuccessfully
哪里错了?忘高手指点下呀!
------解决方案--------------------DESCRIPTION varchar(256) default NULL,后面的逗号去掉
------解决方案--------------------最后一个字段后面不需要逗号,速度给分