select * into #results from (
查询结果集合
) as #results
select * from #results where ID in (select top 10 ID from(select top(2 * 10) ID, SigninIndex from #results order by SigninIndex asc)TT order by TT.SigninIndex desc)order by SigninIndex asc Drop Table #results
转载于:https://www.cnblogs.com/xiruojun/p/10110422.html