初识 存储过程
--仅仅是test create proc JustForTest @pageIndex int, @pageSize int, @count int output as begin select @count=COUNT(1) from Users with(nolock) select * from ( select *,ROW_NUMBER() over(order by Id desc) as rowIndex from Users with(nolock) ) as a where a.rowIndex between (@pageIndex-1)*@pageSize and @pageIndex*@pageSize end --调用 declare @count2 int exec JustForTest 2,2,@count2 output print @count2
浙公网安备 33010602011771号