MySQL建表错误???

建表语句如下:CreatetableUserInfo(idintprimarykeynotnullauto_increment,namevarchar(15)notnul... 建表语句如下:
Create table UserInfo(
id int primary key not null auto_increment,
name varchar(15) not null,
job tinyint not null,
level tinyint not null default 1,
cap tinyint not null,
cloth tinyint not null,
weapon_display tinyint not null,
weapon_2 tinyint,
weapon_3 tinyint,
weapon_near enum(0,1),
shoe tinyint not null,
money int not null,
passwordbag int not null,
team int not null,
company int,
hp int not null,
mp int not null,
exp int not null,
liliang int not null,
tizhi int not null,
minjie int not null,
wuxing int not null,
fuyuan int not null,
wugong int not null,
wufang int not null,
speed int not null,
canpluspoint tinyint not null,
qianneng int not null,
lastmap tinyint,
lastx int,
lasty int,
shifu int,
tudi_1 int,
tudi_2 int,
tudi_3 int,
tudi_4 int,
tudi_5 int,
islogin enum(0,1) not null,
lastlogintime datetime,
role enum(N,A),
hpshangxian int not null,
mpshangxian int not null,
expsuoxu int not null,
dollar int not null
);
ERROR 1064(42000):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 '0,1),

shoe tinyint not null,
money int not null,
passwordbag int not null,
team ' at line 11

究竟是怎么回事啊?我检查了好久都检查不出错误。。。。。。55555
展开
 我来答
望远镜里的星星
2009-03-21
知道答主
回答量:0
采纳率:0%
帮助的人:0
展开全部
enum括号里的内容,加上引号试试 enum('0','1') enum('N','A')
错误提示了有所说明了。“……near '0,1),……”,在 0,1)附近有错。

Create table UserInfo(
id int primary key not null auto_increment,
name varchar(15) not null,
job tinyint not null,
level tinyint not null default 1,
cap tinyint not null,
cloth tinyint not null,
weapon_display tinyint not null,
weapon_2 tinyint,
weapon_3 tinyint,
weapon_near enum('0','1'),
shoe tinyint not null,
money int not null,
passwordbag int not null,
team int not null,
company int,
hp int not null,
mp int not null,
exp int not null,
liliang int not null,
tizhi int not null,
minjie int not null,
wuxing int not null,
fuyuan int not null,
wugong int not null,
wufang int not null,
speed int not null,
canpluspoint tinyint not null,
qianneng int not null,
lastmap tinyint,
lastx int,
lasty int,
shifu int,
tudi_1 int,
tudi_2 int,
tudi_3 int,
tudi_4 int,
tudi_5 int,
islogin enum('0','1') not null,
lastlogintime datetime,
role enum('N','A'),
hpshangxian int not null,
mpshangxian int not null,
expsuoxu int not null,
dollar int not null
);
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式