存储过程分页
create PROCEDURE [dbo].[GetGoodsIDList]
@siteID int,
@pageSize int,
@pageIndex int
AS
BEGIN
SELECT ID FROM
(
SELECT ROW_NUMBER() OVER(ORDER BY ID asc) AS NUM,ID FROM goods_products where siteid=@siteID
) TB
WHERE NUM>=@pageSize*(@pageIndex-1) AND NUM<= @pageSize*@pageIndex
END
-------此处无银三百两------