存储过程分页的经典例子
2009-03-14 14:13
309 查看
原文:http://www.sufeinet.com/thread-2111-1-1.html
USE [PLAYBAR_PERSONAL] GO /****** 对象: StoredProcedure [dbo].[CP_select_All_Customer] 脚本日期: 03/10/2009 21:09:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: sufei -- Create date: <2009-2-16,,> -- Description: <查询所有的用户信息 ---Table (手机号,用户名,用户信箱,用户年龄,性别,用户职业,兴趣爱好,现居地,用户积分,注册时间 ,备注) -- ============================================= ALTER PROCEDURE [dbo].[CP_select_All_Customer] @startindex int , @pagesize int AS BEGIN with NewCustomer as ( select row_number()over (order by Cus_Id)as rownumber, Cus_MSISDN,Cus_Name,Cus_Email,Cus_Age,Cus_Sex,Cus_Job,Cus_Intrestings,Cus_Address,Cus_Value,Cus_RegTime,Cus_Remark,Cus_State from Customer where Isdelete=0 ) select rownumber, Cus_MSISDN,Cus_Name,Cus_Email,Cus_Age,Cus_Sex,Cus_Job,Cus_Intrestings,Cus_Address,Cus_Value,Cus_RegTime,Cus_Remark,Cus_State from NewCustomer where rownumber >=(@startindex-1)*@pagesize+1 and rownumber<=(@startindex-1)*@pagesize+(@pagesize) select count(*) from Customer where Isdelete=0 END
相关文章推荐
- 插入数据的存储过程的经典例子
- 带游标的存储过程例子,很经典
- 利用存储过程进行高效分页的例子
- 存储过程分页简单例子
- SQL Server 存储过程的经典分页
- SQL Server 存储过程的经典分页
- SQL Server 存储过程的经典分页
- SQL Server 存储过程的经典分页
- SQL Server 存储过程的经典分页
- SqlServer 多条件查询 [存储过程] 经典例子结合C#的使用
- SQL Server 存储过程的经典分页
- 原创--DataGrid自动分页例子,通过存储过程
- 存储过程分页的好的例子
- SQL Server 存储过程的经典分页
- SQL Server 存储过程的经典分页
- SQL Server 存储过程的经典分页
- 转贴存储过程分页的例子
- SqlServer 多条件查询 [存储过程] 经典例子
- SQL Server 存储过程的经典分页
- SQL Server 存储过程的经典分页