首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Mysql >

MYSQL 自动增加错了,该怎么解决

2012-02-10 
MYSQL 自动增加错了mysql create table c(id int primary key identity(1,1))ERROR 1064 (42000): You h

MYSQL 自动增加错了
mysql> create table c(id int primary key identity(1,1));
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 'ident
ity(1,1))' at line 1


create table c(id int primary key identity(1,1)); 哪里写错了? 

谢谢大家帮忙

[解决办法]
MySQL 中没有 identity(1,1));

是auto_increment

SQL code
create table c(id int primary key auto_increment); 

热点排行