select *
from Production.Product
where ProductID in (
select ProductID
from (
select ProductID,
ROW_NUMBER() OVER(ORDER BY ProductID) as nid
from Production.Product
) as tid
where nid between 21 and 50
)
go
转载于:https://www.cnblogs.com/bmate/archive/2008/12/29/1364224.html