MySQL
1
2
-- n为页码,m为每页数据条数
select * from table_name limit (n-1)*m, m
Oracle
1
2
3
4
5
-- n为页码,m为每页数据条数
select a.* from (
select b.*,rownum as rn from table_name b
) a
where a.rn between (n-1)*m+1 and n*m
MySQL
1
2
-- n为页码,m为每页数据条数
select * from table_name limit (n-1)*m, m
Oracle
1
2
3
4
5
-- n为页码,m为每页数据条数
select a.* from (
select b.*,rownum as rn from table_name b
) a
where a.rn between (n-1)*m+1 and n*m
A new version of content is available.