最直接的办法 select * from (select top 10 * from (select top 40 * from tablename order by ordercolumn) a order by ordercolumn desc) b
select top 10 * from 表 where 主键 not in (select top 30 主键 from 表 order by 主键 )order by 主键
select top 40 col into #aa from tb order by col select top 10 col into #bb from #aa order by col select * from #aa where col not in (select col from #bb)col为主键,tb为表
select *
from (select top 10 *
from (select top 40 *
from tablename
order by ordercolumn) a
order by ordercolumn desc) b
where 主键 not in (select top 30 主键 from 表 order by 主键
)order by 主键
select top 10 col into #bb from #aa order by col
select * from #aa where col not in (select col from #bb)col为主键,tb为表