The increment is optional clause. Positive value will make ascending sequence, negative - descending. Default value is 1.
The optional integer minvalue determines the minimum value a sequence can be. Defaults are 1/-2147483647 for ascending/descending sequences.
Use optional integer maxvalue to determine the maximum value for sequence. Defaults are 2147483647/-1 for ascending/descending sequences.
The optinal start value enables sequence to begin anywhere. Default is minvalue for ascending sequences and maxvalue for descending ones.
The cache option enables sequence numbers to be preallocated and stored in memory for faster access. The minimum value is 1 (i.e. - no cache) and it is default. NOTE: each backend uses own cache to store allocated numbers. Cached but not used in current session numbers will be lost.
The optional cycle keyword may be used to enable sequence to continue when the maxvalue/minvalue has been reached by ascending/descending sequence. If the limit is reached, the next number generated will be whatever the minvalue/maxvalue is.
After sequence created, You may use function nextval with sequence name as argument to get new number from sequence specified. Function currval ('sequence_name') may be used to determine number returned by last call to nextval for specified sequence in current session.
Use query like
select * from <sequence_name>;
to get parameters of a sequence.
Low-level locking is used to enable multiple simultaneous calls to a generator.