In SQL Server, we can use sequences to generate sequence numbers that increment by a specified amount. This means that any new number generated by the sequence will be the next sequential increment as specified in the sequence’s definition.
Normally, this is exactly what we want. We want each number to adhere to the increment that we specified when defining the sequence.
But what if we want to reset the sequence, so that the numbering starts all over again? In other words, we want to restart the sequence from the beginning. Or what if we want to reset the sequence so that it increments in a different range?
Fortunately, we can reset a sequence with the ALTER SEQUENCE
statement.
Continue reading →