首页 > 代码库 > 我的日记本程序日记列表存储过程分页(2)改进正式可用
我的日记本程序日记列表存储过程分页(2)改进正式可用
我的日记本程序日记列表存储过程分页--drop proc procDiarycreate proc procDiary --获取日记列表的分页存储过程 @pageSize int =12, -- @pageIndex int=1, --页码序号 @totalCount int output, --总记录数 @diaryWhere varchar(255) as declare @strSql varchar(500); set @totalCount =CONVERT(int,(select COUNT(1) from t_Diary)); set @strSql = ‘set nocount on select top (‘+convert(varchar(50),@pageSize)+‘) fid,fcid,ftopical,faddDate,feditDate into #diary from t_Diary where Fid not in(select top ((‘+convert(varchar (50),@pageIndex)+‘-1)*‘+convert(varchar(50),@pageSize)+‘) fid from t_Diary order by FaddDate desc,Fid desc)‘ + convert(varchar(255),@diaryWhere) + ‘order by FaddDate desc,Fid desc select * from #diary drop table #diary set nocount off‘; exec(@strSql);
我的日记本程序日记列表存储过程分页(2)改进正式可用
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。