oracle set sequence value to max 28id 29

Solutions on MaxInterview for oracle set sequence value to max 28id 29 by the best coders in the world

showing results for - "oracle set sequence value to max 28id 29"
Juan Manuel
19 Mar 2016
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