oracle创建序列并使用

创建序列

INCREMENT BY 1 
START WITH 1 
NOMAXvalue 
NOCYCLE 
NOCACHE;

执行插入语句(序列的使用)

insert into noteuser (user_id,name,gender,age,area) values(noteuser_seq.nextval,‘green’,‘male’,18,‘beijing’);

删除序列

drop sequence noteuser_user_id_seq;

查询结果

select * from noteuser

猜你喜欢

转载自blog.csdn.net/Lucas_wei/article/details/84284565