MySql无法像Access:以 20 起始且递增 10,把 autoincrement 改为 AUTOINCREMENT(20,10)
参考http://www.w3school.com.cn/sql/sql_autoincrement.asp
以下为MySql的解决方案:
创建表
create table student(
a int not null,
b int not null ,
primary key (a)
);
ALTER table student
add c int not null unique key auto_increment;
update student set c=c+'10000';
ALTER table student
auto_increment=10000;
select * from student
插入数据试试:
insert into student (a,b) VALUES (100,1000);