Retrieving Information on Sequences
user_sequences view has information on your sequences. The columns in user_sequences:
Column | Type | Description |
---|---|---|
sequence_name | VARCHAR2(30) | Name of the sequence |
min_value | NUMBER | Minimum value |
max_value | NUMBER | Maximum value |
increment_by | NUMBER | Number to increment or decrement sequence by |
cycle_flag | VARCHAR2(1) | Whether the sequence cycles (Y or N) |
order_flag | VARCHAR2(1) | Whether the sequence is ordered (Y or N) |
cache_size | NUMBER | Number of sequence values stored in memory |
last_number | NUMBER | Last number that was generated or cached by the sequence |
The all_sequences view has information on all the sequences you have access to. The following example retrieves the details for the sequences from user_sequences:
SELECT *
FROM user_sequences
ORDER BY sequence_name;
Home »
Oracle »
Table »
Oracle »
Table »
Sequence:
- Creating a Sequence
- Retrieving Information on Sequences
- Using a Sequence
- Populating a Primary Key Using a Sequence
- Modifying a Sequence
- Using Sequences in PL/SQL
- Dropping a Sequence
Related: