SQL>
SQL> CREATE SEQUENCE test_seq
2 START WITH 10 INCREMENT BY 5
3 MINVALUE 10 MAXVALUE 20
4 CYCLE CACHE 2 ORDER;
Sequence created.
SQL>
SQL>
SQL> SELECT test_seq.nextval FROM dual;
NEXTVAL
----------
10
SQL>
SQL> SELECT test_seq.nextval FROM dual;
NEXTVAL
----------
15
SQL>
SQL> SELECT test_seq.nextval FROM dual;
NEXTVAL
----------
20
SQL>
SQL> SELECT test_seq.nextval FROM dual;
NEXTVAL
----------
10
SQL>
SQL>
SQL> drop sequence test_seq
2 /
Sequence dropped.
SQL>
SQL>
|