日期:2014-05-17 浏览次数:20684 次
;with t as
(
select 1 id
union all select 2
union all select 3
union all select 4
union all select 5
union all select 6
union all select 9
union all select 11
union all select 12
)
select a.number
from master..spt_values a
left join t on a.number=t.id
where a.type='p' and t.id is null
and a.number between (select min(id) from t) and (select max(id) from t)