4

In a SQL database I can get the increment value of a sequence:

select increment from sys.sequences where name = 'XXX';

Is there a way to do this for a sequence in an Oracle database?

2 Answers 2

6

The corresponding table in Oracle is all_sequences (see here):

select increment_by
from all_sequences
where sequence_name = 'XXX'
and sequence_owner = 'SCHEMANAME';
Sign up to request clarification or add additional context in comments.

Comments

3
select increment_by from user_sequences where sequence_name = 'XXX'

Depending on what user you login as and which schema the sequence is in, you might need to query dba_sequences or all_sequences instead.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.