ALTER PROCEDURE dbo.Pro_ProductsPage
    (
        @PageSize int,
        @Currentindex int
    )
AS
    declare @a nvarchar(50)
    declare @b nvarchar(50)
    declare @c nvarchar(500)
    
    set @a=convert(nvarchar,@PageSize)
    set @b=convert(nvarchar,@PageSize*(@Currentindex-1))
    set @c='select top '+@a+' * from FU_ProductsInfo where ProductsID not in (select top '+@b+' ProductsID from FU_ProductsInfo)'
    
    set @c='select * from ('+@c+')k order by ProductsID desc'
    
    execute sp_executesql @c
    
    RETURN


相关文章:

  • 2022-03-05
  • 2021-08-21
  • 2021-12-28
  • 2021-06-08
  • 2021-11-09
  • 2021-06-11
  • 2021-10-08
  • 2022-12-23
猜你喜欢
  • 2021-12-21
  • 2021-05-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-01
相关资源
相似解决方案