SELECT * FROM ( SELECT A.*, ROWNUM RN FROM (SELECT * FROM TABLE_NAME) A WHERE ROWNUM <= 40 ) WHERE RN >= 21
查询记录 21至40的数据记录
页数page pagesize
开始记录值 RN>=(page-1)*pagesize+1
结束记录索引值ROWNUM<=page*pagesize