读书人

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

发布时间: 2012-02-10 21:27:42 作者: rapoo

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); 

读书人网 >Mysql

热点推荐