摘要:
分页存储过程 : create proc usp_GetMyPhotos @pageIndex int, --当前页码 @pageSize int, --每页多少条 @pageCount int output --计算 总共多少页 as declare @count int --总共多少条 select @count =COUNT(*) from Photos set @pageCount = CEILING( @count*1.0/@pageSize) select * from (select *,ROW_NUMBER() over(order by pid desc) as num fr 阅读全文