您的位置:首页 > 博客中心 > 数据库 >

oracle中的自动增长

时间:2022-03-14 04:01

create table test(
id int not null primary key,
name varchar2(20),
sex int)
;

 

create sequence t ->创建squence,命名为t
minvalue 1       ->最小值
maxvalue 100000  ->最大值
start with 1     ->从1开始
increment by 1   ->增长比例
nocache          ->增长池,为了提高效率,可以设置为 cache 10
;

 

insert into test values(t.nextval,‘zhangyi‘23);

 原文地址:

热门排行

今日推荐

热门手游