Home > Database > Mysql Tutorial > Mysql series (13) paging query statements

Mysql series (13) paging query statements

黄舟
Release: 2017-01-22 17:04:37
Original
949 people have browsed it

Mysql Series (Thirteen) Paging Query Statement

MySql

 select tablename.*  from  tablename limit firstIndex,pageSize;
          firstIndex -------->开始索引
          pageSize--------->页大小
Copy after login

Oracle

select * from (
                           select a.*,ROWNUM rn from tablename a where ROWNUM<=(firstIndex+pageSize)
                          ) where rn>firstIndex;
Copy after login

2.  

 select * from(select * from(select p.*,ROWNUM rn from tablename )p  where p.rownumber>firstIndex)  where rownum>pageSize;
Copy after login

and above This is the content of the paging query statement in the Mysql series (13). For more related content, please pay attention to the PHP Chinese website (m.sbmmt.com)!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template