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