Oracle数据库SQL总结(3)
来源:未知 责任编辑:责任编辑 发表时间:2014-01-25 11:37 点击:次
WHERE RN > 5
2 ) 利用伪列进行分页操作:
Sql代码
SELECT B.*, RN
FROM (SELECT A.*, ROWNUM AS RN2
FROM (SELECT XXKC.WID,
...
ROWNUM AS RN
FROM T_PY_XXKC XXKC
LEFT JOIN T_PY_KC KC ON KC.KCDM = XXKC.XXKCDM
ORDER BY XXKC.XXKCDM) A) B
WHERE B.RN2 > v_start
AND B.RN2 <= (((v_start/10) + 1) * v_limit )
SELECT B.*, RN
FROM (SELECT A.*, ROWNUM AS RN2
FROM (SELECT XXKC.WID,
...
ROWNUM AS RN
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>