摘要:
我们先给出几种主要的分页方法和核心语句,然后直接给出结论,有兴趣的读者可以看看后面的数据几种常用存储过程分页方法TopN方法select Top(@PageSize) from TableName where ID Not IN(Select Top ((@PageIndex-1)*@PageSize)ID from Table Name where .... order by ... )wher... 阅读全文
摘要:
create proc dbo.msp_Goods@PageSize int=10,--页面大小@PageIndex int=1,--当前页码@PID int,--品牌ID@isCount bit=1 --记数,0表示计数,1表示提取数据。as--关闭计数器set nocount onif @isCount= 0select count(*) from goods where PID =@PIDe... 阅读全文