SELECT TEMP_YEAR_sEQUENCENEXTVAL FROM DUAL. Just calling the function increments the sequential number and this allowed up to respect the unique reference and avoid any duplicates or restarting of numbers. Specify the interval between sequence numbers after the INCREMENT BY keyword.
CREATE SEQUENCE sequence_name START WITH initial_value INCREMENT BY increment_value MINVALUE minimum value MAXVALUE maximum value CYCLENOCYCLE.
It caches the sequence numbers to minimize disk IO. This was introduced in SQL Server 2005 so chances are high you can use it if you can create views. Select ROWNUM 10 start value from ALL_OBJECTS where ROWNUM. WITH Numbered AS SELECT SequenceNum RowNum ROW_NUMBER OVER ORDER BY ID FROM dbotestRowNum WHERE EXISTS SELECT FROM IDsToUpdate AS I WHERE IID dbotestRowNumID UPDATE Numbered SET SequenceNum RowNum.