Category Identities

Solve your SQL Server Identities issues with these valuable tips, tutorials, how-to’s, scripts, and more for SQL Server Developers.

Gaps in SQL Server Identity Columns

I have a table that makes use of integer based sequential values (identity based or otherwise) and I need to determine what gaps exist within this table. What is the best way to determine these gaps using a set-based approach (i.e. no cursor operations)?