Get Sequence information from user_sequences table : Sequence Information « Sequences « Oracle PL/SQL Tutorial






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> select * from user_sequences where sequence_name='TEST_SEQ';

SEQUENCE_NAME                   MIN_VALUE  MAX_VALUE INCREMENT_BY C O CACHE_SIZE LAST_NUMBER
------------------------------ ---------- ---------- ------------ - - ---------- -----------
TEST_SEQ                               10         20            5 Y Y          2          10

SQL>
SQL>
SQL> drop sequence test_seq








5.2.Sequence Information
5.2.1.Getting Information on Sequences
5.2.2.Get Sequence information from user_sequences table