create sequence name increment by x //x為增長間隔 start with x //x為初始值 maxvalue x //x為最大值 minvalue x //x為最小值 cycle //循環(huán)使用,到達最大值或者最小值時,從新建立對象 cache x //制定緩存序列值的個數(shù) ------------------------一個例子----------------------- create sequence for_test --序列名 increment by1--每次增加1 start with1--從1開始 nomaxvalue --沒有最大值 nocache --沒有緩存序列 ----------------------------創(chuàng)建測試表------------------ createtable Test ( TestID intprimarykey, TestName varchar2(20) notnull, Tdescription varchar2(200) null ) -----------------------------使用序列------------------- insertinto Test values(for_test.nextval,'序列測試','這是一個序列使用的例子') --------------------序列使用結(jié)果查詢----------------- select*from test