select B.r,B.* from ( select A.*, rownum as r from ( select rownum as rno,runcode, startstncode, linecode, cartypecode, cargradecode, seatnum, stopsaletime, checkdoor, endstncode, isstop, iscirclerun, canattachrun, orgruncode, authorusercode, transportkind, checkstatus, checkercode, checkercontent, operationdate, rundays, restdays, linedescribe, openflag, ismodify from mds_run order by runcode ) A where rownum<21 ) B where B.r > 10
oracle 数据库分页。
SELECT * FROM ( SELECT A.*, ROWNUM RN FROM ( SELECT * FROM usr_user ) A WHERE ROWNUM <= ? )WHERE RN >= ?