create procedure procPage @startIndex int,@endIndex int,@sort varchar(50)='asc'

as

with pageTamp as(

 select row_number() over(order by id @sort) as row,* from dbo.WZ_YouQing)

 select * from pagetamp where row between @startIndex and @endIndex

消息 102,级别 15,状态 1,过程 procPage,第 4 行
'@sort' 附近有语法错误。

- 上面这样写为什么错误呢?

只有下面这样写吗,有没有更简单的方法哦? 

 

 row between @startIndex and @endIndex

end


 

相关文章:

  • 2021-12-20
  • 2021-08-04
  • 2021-11-02
  • 2021-09-15
  • 2021-09-27
  • 2022-01-24
猜你喜欢
  • 2021-09-14
  • 2021-06-30
  • 2022-12-23
  • 2021-12-12
  • 2021-09-01
  • 2022-01-01
  • 2021-12-14
相关资源
相似解决方案