Fork me on GitHub

MySQL与Oracle中的基本分页

MySQL中的基本分页:

select

       ename

from 

     emp

where xxxxx

order by

   sal  desc

limit 

   (pageno-1)*pageSize,pageSize;

Oracle中的基本分页

 select tt.*

 from (

select t.*,rownum as  linenum

from 

(select  * from  tbl_role) t

where 

rownum <#{0}*#{1}

)tt

where 

linenum  >(#{0}-1)*#{1}

  

posted @ 2016-08-22 00:13  THAT'SALL  阅读(464)  评论(0编辑  收藏  举报