分页---MySQL----Oracle

mac2025-02-12  12

MySQL:

limit

select * from tableName limit 3                   默认从第0条开始取3条

select * from tableName limit 3,3                 从第3条开始(不包括第3),取3条数据

 

Oracle

子查询rownum

select   t1.*

from 

(

select rownum rnum,* 

from 

tableName

where 

rownum <= 20

) t1

where t1.rnum > = 10

 

 

最新回复(0)