SQL server identity column values start at 0 instead of 1

From DBCC CHECKIDENT

DBCC CHECKIDENT ( table_name, RESEED, new_reseed_value )

If no rows have been inserted to the table since it was created, or all rows have been removed by using the TRUNCATE TABLE statement, the first row inserted after you run DBCC CHECKIDENT uses new_reseed_value as the identity. Otherwise, the next row inserted uses new_reseed_value + the current increment value.

So, this is expected for an empty or truncated table.


If you pass a reseed value the DB will start the identity from that new value:

DBCC CHECKIDENT (SyncSession, RESEED, 0); --next record should be 0 + increment

You don't have to pass the a value though, if you don't IDENTITY(a,b) will be used instead:

DBCC CHECKIDENT (SyncSession, RESEED); --next record should be the seed value 'a'

This is usually better practice, as it leaves the table closer to its initial created state.