Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get Increment from Sequence in Oracle

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?

like image 608
Palmi Avatar asked Oct 26 '25 19:10

Palmi


1 Answers

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

select increment_by
from all_sequences
where sequence_name = 'XXX'
and sequence_owner = 'SCHEMANAME';
like image 81
Gordon Linoff Avatar answered Oct 29 '25 08:10

Gordon Linoff



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!