[Oracle] Sequence

Create Sequence seq_name
Start With 1 
Increment By 1
Maxvalue 100
Minvalue 1
Cache 2
Cycle

Select seq_name.Nextval From dual
Select seq_name.Currval From dual

Alter Sequence seq_name
Increment By 2
Maxvalue 99
Minvalue 1
Nocache
Nocycle


Select * From user_sequences
Select * From seq --user_sequences同义词


Drop Sequence seq_name 

你可能感兴趣的:(oracel sequence)