当前位置:Gxlcms > 数据库问题 > Oracle 怎么让id自增加

Oracle 怎么让id自增加

时间:2021-07-01 10:21:17 帮助过:18人阅读

自增长序列 create table test( tid int not null, tname varchar(20), tsex varchar(20), tbz varchar(50) ) --添加主键约束 alter table test add constraint test_pk primary key (tid) --自增序列 create sequence test_seq minvalue 1 maxvalue 1000 start with 1 increment by 1 --插入数据 insert into test values(test_seq.nextval,张三,,无备注); insert into test values(test_seq.nextval,李四,,组长);

 

Oracle 怎么让id自增加

标签:test   nbsp   tar   数据   into   log   rem   value   添加   

人气教程排行