分页查询SQL

时间:2014-05-26 20:44:28   收藏:0   阅读:256

SELECT
 *
FROM
 ( SELECT
   T.*,
   ROWNUMBER() OVER() AS ROWNUM
  FROM
   ( SELECT
     L4_GDS_GROUP_CD CODE,
     L4_GDS_GROUP_DESC NAME
    FROM
     DM_GDS_GROUP_INF_TD
    WHERE
     (L4_GDS_GROUP_CD LIKE ‘%手工制作%‘ OR
     L4_GDS_GROUP_DESC LIKE ‘%手工制作%‘) FETCH FIRST 50 ROWS ONLY
   )
   T
 )
WHERE
 ROWNUM > 0 AND
 ROWNUM <= 50

分页查询SQL,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!