Finding gaps in a sequence of identifier values of sql table.

Today I would like to present a couple of solutions for problem of finding gap in a sequence. This issue will be considered in context of finding missing – gap identifiers in the database table. All examples of code are T-SQL scripts and statements and were tested on SQL Server 2008 Express 1. Integer typed identifiers Lets assume we have an sql table with following schema Fiel…

By Mirek on (tags: gaps in sequence, id gap, table id finding, categories: code)