在mysql(版本:5.0.18-nt)上运行以下语句报错Create table ever_user
(
Uid char(40) not null,
Pwd char(40) not null,
Info char(100) not null,
Eassy int not null,
Totaltime char(14) not null,
Reads int not null,
If_new_info int not null,
Constraint pk_ever_user primary key (Uid)
);
错误信息:
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 'Reads
int not null,
If_new_info int not null,
Constraint pk_ever_user primary ke' at line 8本人英文不太好,是语法错误,但是我又找不到哪里错了!
请教各位大虾!先谢谢了
问题补充:在MSSQLserver(版本:8.00.2039)上可以正确建表运行没有任何错误,更郁闷了!
另外三段sql语句能够正确运行,语句如下:
Create table currentuser
(
Num int not null,
Uid char(40) not null,
Lastlogon char(14) not null,
serialNum int not null,
constraint pk_currentuser primary key (num)
)Create table detail
(
Uid char(40) not null,
Levels int not null,
Visits int not null,
Dataandtime char(14)not null,
Length int not null,
Content char(100) not null,
Constraint pk_detail primary key (uid)
)Create table new_essay
(
Fieldid char(40) not null,
Theme char(100) not null,
Dataandtime char(14)not null,
Constraint pk_new_essay primary key (Fieldid)
)
(
Uid char(40) not null,
Pwd char(40) not null,
Info char(100) not null,
Eassy int not null,
Totaltime char(14) not null,
Reads int not null,
If_new_info int not null,
Constraint pk_ever_user primary key (Uid)
);
错误信息:
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 'Reads
int not null,
If_new_info int not null,
Constraint pk_ever_user primary ke' at line 8本人英文不太好,是语法错误,但是我又找不到哪里错了!
请教各位大虾!先谢谢了
问题补充:在MSSQLserver(版本:8.00.2039)上可以正确建表运行没有任何错误,更郁闷了!
另外三段sql语句能够正确运行,语句如下:
Create table currentuser
(
Num int not null,
Uid char(40) not null,
Lastlogon char(14) not null,
serialNum int not null,
constraint pk_currentuser primary key (num)
)Create table detail
(
Uid char(40) not null,
Levels int not null,
Visits int not null,
Dataandtime char(14)not null,
Length int not null,
Content char(100) not null,
Constraint pk_detail primary key (uid)
)Create table new_essay
(
Fieldid char(40) not null,
Theme char(100) not null,
Dataandtime char(14)not null,
Constraint pk_new_essay primary key (Fieldid)
)
解决方案 »
- MySql数据库使用sybase反向生成pdm时字段重复,求解决方案
- mysqlbinlog: error writing file 'unopened' <errcode:22>
- 关于存储过程问题
- MYSQL 如何修改BLOB类型的数据?
- mysql新手问题
- 菜鸟请教关于phpmyadmin使用的问题??
- 如何保证两个表的数据能正确插入?既在插入第二个表的时候能正确插入。
- 关于写入的问题
- APP项目数据库维护
- CentOs:ERROR 2002 (HY000): Can't connect to local MySQL server through socket
- Mysql的问题
- 数据插入效率讨论
过来了!
Create table ever_user
(
Uid char(40) not null,
Pwd char(40) not null,
Info char(100) not null,
Eassy int not null,
Totaltime char(14) not null,
Reads_xiaoyu int not null,
If_new_info int not null,
Constraint pk_ever_user primary key (Uid)
); 这样就过去了,你的Reads字段改了就可以过来了,【reads】保留字!