1. 程式人生 > >oracle-----序列

oracle-----序列

建立序列:

create sequence mysql;

查詢序列:

select * from user_sequences;

插入序列:

insert into member(mid,name)values(mysql.nextval,'A');

刪除序列:

drop sequence mysql;


序列步長預設增長是1,設定為步長為3:

create sequence mysql increment by 3;

設定步長為3,以30開始:

create sequence mysql increment by 3 start with 30;