表'样本'包含字段 [AffiliateId]作为主键, [AffiliateCode] L, [名称] , [AddressId] [, [url], [电子邮件ID] , [ShopId],
我需要一个自定义分页的存储过程
答案 0 :(得分:4)
在sqlserver 2005 reference或example中:
SELECT * FROM ( SELECT row_number() OVER (ORDER BY id) AS resultNum, id FROM table_name) AS numberResultsWHERE resultNum BETWEEN ? AND ?
对于旧版本,请参阅reference或reference2