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

相关文章: