要定义的变量→当前页数:curr 每页显示条数:page
- Mysql :Select from 表名 limit (curr-1)*page
- MSsql2000:Select top page * from 表名 where 主键 not in (select top (curr-1)*page 主键 from 表名 order by 主键)
- Oracle:Select * from (Select rownum temp_rownum,temp_table.* from (Select * from 表名
) temp_table where rownum< curr * page + 1) where temp_rownum>= (curr - 1) * page + 1
order by 主键 desc
本文介绍了在不同数据库系统中实现分页查询的方法,包括Mysql、MSsql2000及Oracle,通过设置当前页数和每页显示条数来获取指定页面的数据。
261

被折叠的 条评论
为什么被折叠?



