日期:2014-05-18 浏览次数:20702 次
create table #ta
(id varchar(5), num int)
insert #ta
select '01', 2
union all select '02', 4
union all select '03', 7
union all select '04', 0
union all select '05', 1
union all select '06', 3
union all select '07', 9
union all select '08', 11
select * from
(
select top 2 id, num
from #ta order by num
)t1
union all
select * from
(select top 2 id, num
from #ta order by num desc)t2
order by num desc