How to Alter Database Sequence or How to increment or decrements sequence.

How to Alter Database Sequence or How to increment or decrements sequence.

select * from all_sequences
where sequence_name like ‘RA_TRX_NUMBER%’;

SELECT last_number
FROM all_sequences
WHERE sequence_name = ‘RA_TRX_NUMBER_N1_81_S’;

SELECT last_number
FROM all_sequences
WHERE sequence_name = ‘RA_TRX_NUMBER_3001_81_S’;

SELECT (23481-22119) FROM dual;

ALTER SEQUENCE AR.RA_TRX_NUMBER_N1_81_S INCREMENT BY 1500;

SELECT RA_TRX_NUMBER_N1_81_S.NEXTVAL FROM dual;

ALTER SEQUENCE AR.RA_TRX_NUMBER_N1_81_S INCREMENT BY 1;

 

Thanks Yogesh

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s