;with mycte as (SELECT * ,ROW_NUMBER() OVER(ORDER BY OrderID DESC ) RN40FROM dbo.Orders) select *from mycteWHERE RN40 >20 and RN40 <=40Order by OrderID ASC
No comments:
Post a Comment