Referencing Sequences:
A sequence is referenced in SQL statements by using NEXTVAL and CURRVAL pseudocolumns. The NEXTVAL denotes the sequence's new number and CURRVAL denotes the current sequence number.
Example:
SELECT s1. NEXTVAL FROM dual;
Displays
NEXTVAL
-------
1
This will be used in Insert operations also.
INSERT INTO emp(empno,ename,job) VALUES(s1.NEXTVAL,'gita','manager');
The record would be inserted where the employee number will be the value stored in the NEXTVAL pseudocolumn.
Altering a sequence:
Sequences can be altered to perform: Eliminate minimum or Set or maximum value or altering the incremental values or modifying the number of cached sequence numbers.
ALTER SEQUENCE s1 MAXVALUE 25;