CREATEprocedure pagination1 (@pagesize int, --页面大小,如每页存储20条记录 @pageindex int--当前页码 ) as set nocount on begin declare @indextable table(id intidentity(1,1),nid int) --定义表变量 declare @PageLowerBound int--定义此页的底码 declare @PageUpperBound int--定义此页的顶码 set @PageLowerBound=(@pageindex-1)*@pagesize set @PageUpperBound=@PageLowerBound+@pagesize <