what you can do is use the following command:
DBCC CHECKIDENT
This command checks the current identity value of the specified table and, if necessary, changes the identity value. You can also use DBCC CHECKIDENT to manually set a new current identity value for the identity column.
BCC CHECKIDENT ( table_name [, { NORESEED | { RESEED [, new_reseed_value ] } } ] )
The parameters are:
tablename - It is the name of the table on which to check the current identity value. The specified table must contain an identity column. Table names should be compatible with the rules for identifiers.
NORESEED - Specifies that the current identity value should not be changed.
RESEED - Specifies that the current identity value should be changed.
new_reseed_value - The new value to be used as the current value of the identity column.
For your specific case I believe the command:
DBCC CHECKIDENT ('dbo.envios', RESEED, 1)
Solve the problem.
More information here.
This is the expected behavior of 'Auto increment', once initialized will always be (auto) incremented.
– ramaral
and there is no way to reset?
– Fabio Gonçalves