存储过程实现自定义分页
2007-10-26 14:56
253 查看
分页存储过程:
create procedure sp_GetCurentPage
(@pagesize int, --页面大小
@pageindex int) --当然页号
as
begin
with temptbl as (
SELECT ROW_NUMBER() OVER (ORDER BY address desc)AS Row, * from test )
SELECT * FROM temptbl where Row between (@pageindex-1)*@pagesize+1 and (@pageindex-1)*@pagesize+@pagesize
end
create procedure sp_GetCurentPage
(@pagesize int, --页面大小
@pageindex int) --当然页号
as
begin
with temptbl as (
SELECT ROW_NUMBER() OVER (ORDER BY address desc)AS Row, * from test )
SELECT * FROM temptbl where Row between (@pageindex-1)*@pagesize+1 and (@pageindex-1)*@pagesize+@pagesize
end
相关文章推荐
- GridView利用分页存储过程实现真正的自定义分页查询
- 分页存储过程(用存储过程实现数据库的分页代码)
- 存储过程或自定义函数调用存储过程的变通实现方法
- ASP.NET中利用DataGrid的自定义分页功能和存储过程结合实现高效分页
- asp.net下Repeater使用 AspNetPager分页控件 不用存储过程 完美实现
- 在基于hibernate JPA中实现自定义的分页代码
- 帝国CMS首页及其它自定义页面调用信息实现分页功能
- 曾今的代码系列——自己的分页控件+存储过程实现分页
- GridView使用存储过程实现分页效果11.24
- GridView自定义分页的四种存储过程
- Oracle中通过存储过程实现分页
- GridView+存储过程实现自定义分页
- GridView自定义分页的四种存储过程
- Repeater控件不用存储过程实现分页,DataList同理
- 对《自定义GridView分页模板中页码Button的实现》中程序的改进,追加显示空行功能
- .net自定义分页实现以及没有任何数据时保留表头
- 存储过程实现分页的程序
- 用存储过程实现数据分页
- oracle实现存储过程的分页并用java代码调用存储过程
- 使用存储过程实现分页打印