oracle自增序列创建

表atable(id,a) id需要自增 首先建立一个序列:
create sequence seq_atable minvalue 1 maxvalue 999999999999999999 start with 1 increment by 1 nocache

仅使用序列,需要在插入数据时,自增字段插入序列下一个值

如:insert into atable(id,a) values(seq_atable.nextval,'test');

原文地址:https://www.cnblogs.com/feifeicui/p/8743750.html