日期:2014-05-16 浏览次数:20425 次
SELECT * FROM (SELECT T.*, ROWNUM ROWNUM_ FROM (SELECT A.* FROM table A ORDER BY A.FieldName DESC) T WHERE ROWNUM < endNum) T WHERE T.ROWNUM_ > startNum
SELECT X.* FROM (SELECT ROW_NUMBER() OVER(ORDER BY FieldName DESC) AS ROW_NO, A.* FROM table A) X WHERE X.ROW_NO <= 41 AND X.ROW_NO >= 21;