标签:
--SQL Server 中创建存储过程
create proc usp_UserConsultingPaging @pageNumber int,--页码 @pageSize int,--条数 @sumCount int output --总页数 as begin set @sumCount=(CEILING((select count(*) from [dbo].[DD_CustomerProblem])*1.0/@pageSize)) select * from (select 编号=ROW_NUMBER() over (order by [ProblemID]),* from [dbo].[DD_CustomerProblem]) as xb where xb.编号 between (@pageNumber-1)*@pageSize+1 and @pageNumber*@pageSize end declare @sc int exec usp_UserConsultingPaging 1,5,@sc output select @sc
--SQL Server中执行存储过程
declare @sc int exec usp_UserConsultingPaging 1,5,@sc output select @sc --表示分几页
--SQL Server删除存储过程
drop proc usp_UserConsultingPaging
标签:
原文地址:http://www.cnblogs.com/xbblogs/p/4736761.html