oracle alter sequence max value

Solutions on MaxInterview for oracle alter sequence max value by the best coders in the world

showing results for - "oracle alter sequence max value"
Luciano
02 Jan 2019
1SELECT LAST_NUMBER FROM ALL_SEQUENCES WHERE SEQUENCE_NAME = 'seq_name';
2
3ALTER SEQUENCE seq_name INCREMENT BY 100;	-- Value to reach desired value - 1
4SELECT seq_name.nextval FROM dual;			-- Reinitialize value to desired
5ALTER SEQUENCE seq_name INCREMENT BY 1;		-- Back to init step
Adel
01 Jan 2019
1ALTER SEQUENCE seq_name INCREMENT BY 2;
2ALTER SEQUENCE seq_name MAXVALUE 1000;
3ALTER SEQUENCE seq_name NOMAXVALUE;
4ALTER SEQUENCE seq_name MINVALUE 10;
5ALTER SEQUENCE seq_name NOMINVALUE;
6ALTER SEQUENCE seq_name CACHE 1000;
7ALTER SEQUENCE seq_name NOCACHE;
8ALTER SEQUENCE seq_name CYCLE;
9ALTER SEQUENCE seq_name NOCYCLE;