SELECT * FROM ( SELECT ID AS Corrente, LEAD(ID, 1,0) OVER (ORDER BY ID) AS Seguinte FROM Tabela ) T WHERE Seguinte - Corrente <> 1 -- Fonte