sqlserver2000 分页存储过程 出错问题

vip__888 vip__888 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
create procedure pagination
(
@startIndex int,
@endIndex int,
@docount bit,
@tableName varchar(50),
@order varchar(50),
@where varchar(1000)
)
as
set nocount on
if(@docount=1)
select count(*) from "+@tableName+"
else
begin
declare @indextable table(id int identity(1,1),nid int)
set rowcount @endIndex
insert into @indextable(nid) select * from "+@tableName+" order by "+@order+"
select * from "+@tableName+" o,@indextable t where "+@where+"
and t.id between @startIndex and @endIndex order by t.id
end





以上是我用分页控件生成的存储过程,但是我改过之后,就出现问题了,不知道为什么出错,哪位大虾帮我看下!
set nocount off
...全文

相关推荐

评论 11
收藏 已收藏
分享
返回顶部
vip__888
.NET社区 62,275 成员 668,968 内容