Исправление sjinks, 24.09.12 14:22 (текущая версия) :
SELECT t1.id+1 FROM tbl AS t1 LEFT JOIN tbl AS t2 ON t1.id+1 = t2.id WHERE t2.id IS NULL ORDER BY t1.id
?
Исходная версия sjinks, 24.09.12 14:18:
SELECT t1.id+1 FROM tbl AS t1 LEFT JOIN tbl AS t2 ON t1.id+1 = t2.id WHERE t2.id IS NULL