--测试数据
create table T( id int)
insert into T
select 1 union
select 4 union
select 6 union
select 8 union
select 10 union
select 11
--查询语句
select id-1 as 缺号 from t a where id>1 and not exists(select * from t where id=a.id-1)
select id from
(
select 1 as id
Union all select 2 Union all select 3
Union all select 4 Union all select 5
Union all select 6 Union all select 7
Union all select 8 Union all select 9
) aa
where id not in (select 你的列 from 你的表)