码迷,mamicode.com
首页 > 其他好文 > 详细

二次翻转分页

时间:2017-10-10 16:41:24      阅读:138      评论:0      收藏:0      [点我收藏+]

标签:asc   ber   from   select   temp   with   sel   where   tween   

SELECT
*
FROM ( SELECT *
FROM ( SELECT ROW_NUMBER() OVER ( ORDER BY t1.t1id , t2.t2id ASC) AS num ,
t1.t1id ,
t2.t2id
FROM t1 WITH ( NOLOCK )
INNER JOIN t2 WITH ( NOLOCK ) ON t1.re1 = t2.re2
) AS t
WHERE num BETWEEN 400000 AND 400020
) AS temp
INNER JOIN t1 WITH ( NOLOCK ) ON t1.t1id = temp.t1id
INNER JOIN t2 WITH ( NOLOCK ) ON t2.t2id = temp.t2id

二次翻转分页

标签:asc   ber   from   select   temp   with   sel   where   tween   

原文地址:http://www.cnblogs.com/caiyongxi/p/7645563.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!