1、mysql
create table t_user(
id int(100) not null auto_increment primary key, ---创建时,必须是主键才能自增长
age int(100) not null,
name varchar(100) not null
)
insert into t_student2(id,age,name,address) values(id,12,'qw','dd');

2、oracle
create sequence t_user_seq
insert into t_user values(t_user_seq.nextval,id,age,name)
注意:mysql自增长会导致锁表,所以有特殊情况时,不能使用auto_increment