oracle分页查询SQL

分页查询,第二页,每页10条数据

select * from ( 
    select row_limit.*, rownum rownum_ from (
        select count_num.*, count(1)over() totalnum_ from (
          select * from mdkzwmx where lgrpcd ='9999' and bzbrch ='0098' and recdst = '0' order by loancf,detlsq 
    ) count_num  
  ) row_limit where rownum <= 20 
)where rownum_ >10

 

你可能感兴趣的:(数据库相关)