MySQL建表错误???

来源:百度知道 编辑:UC知道 时间:2024/06/16 22:20:59
建表语句如下:
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 nul

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,
la