如果:最好怎么使用也贴出来谢谢的

解决方案 »

  1.   

    官方不是什么都有吗?http://www.webdiyer.com有示例     有使用源代码下载    连存储过程生成器都放上去了还分2000和2005的呢
      

  2.   

    http://topic.csdn.net/u/20100414/22/021705b1-73ed-4b8d-ba24-e357827e2da9.html
      

  3.   

    给你贴个自己写的:
    ALTER proc [dbo].[SelectProjByCategoryID](@categoryID int,@currentIndex int, @pageSize int,@recordCount int output) as 
    declare @pageLowerBound int
    declare @pageUpperBound int
    set @pageLowerBound = @pageSize * (@currentIndex - 1)
    set @pageUpperBound = @pageSize * @currentIndexselect * from (select *,row_number() over(order by ProjBaseTable.ID desc) as row_index 
    from ProjBaseTable) as t1
    where row_index >@pageLowerBound and row_index <= @pageUpperBound select @recordCount=count(*) from  ProjBaseTable