參考資料:http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_6015.htm#SQLRF01314
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 Sequence_Name minvalue 1 maxvalue 9999999999999999999999999999 start with 1 increment by 1 cache 2 cycle;
說明
MINVALUE:最小起始號
MAXVALUE:最大結束號
START WITH:下一個取號
INCREMENT BY:每次增加
CYCLE:取到最大值後, 是否再循環由最小值開始
CACHE:先暫存取號數量,預設2(最大值似乎依照版本不同不一樣)
ORDER:是否依照順序取號
NOORDER:Specify NOORDER if you do not want to guarantee sequence numbers are generated in order of request. This is the default.
沒有留言:
張貼留言