Now we can check the data in the table: –
SELECT * FROM [dbo].[TestTable] GOAs expected, there’s a gap in the IDs. Why it jumps to 1002 is discussed in the connect item.
OK, now let’s try running the same code again but this time we will disable the identity cache.
This doesn’t eliminate gaps altogether; those can still happen upon rollback of a transaction. This is reason #1 why you should not use identity columns as proper sequences.