CREATE SEQUENCE [schema.]sequence
[INCREMENT BY integer]
[START WITH integer]
[MAXVALUE integer | NOMAXVALUE]
[MINVALUE integer | NOMINVALUE] [CYCLE | NOCYCLE]
[CACHE integer | NOCACHE]
[ORDER | NOORDER] create SEQUENCE aa START WITH 1;
insert into table1 (f1) vaules(aa.nextval);
[INCREMENT BY integer]
[START WITH integer]
[MAXVALUE integer | NOMAXVALUE]
[MINVALUE integer | NOMINVALUE] [CYCLE | NOCYCLE]
[CACHE integer | NOCACHE]
[ORDER | NOORDER] create SEQUENCE aa START WITH 1;
insert into table1 (f1) vaules(aa.nextval);
increment by 1
start with 1
maxvalue 999999999
cycle;调用:
insert into table(id,name) values(seq_name.nextval,'rockethead');