sql server 数据库分页语句,讲查询结果作为表操作

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

posted @ 2018-12-12 18:55  众爱卿平身  阅读(155)  评论(0编辑  收藏  举报