1.orcale,sqlserver,mysql数据库常用分页查询
orcale
select * from (
select a.*,rownum nu from
(select * from table)a where rownum<20
)where nu>5
查询第6条到第19记录
sqlserver
select top 10 * from table where id not in (
select top 5 id from table
)
查询第6条到第15记录
mysql
select * from table limt 20,5
查询第21条到第25记录