Implement LIMIT with SQL Server

SQL Server


Famous database from Microsoft. Skyvia requires the server to be available from Internet.

How to implement LIMIT with Microsoft SQL Server ?

Query Text

WITH OrderedOrders
AS (SELECT SalesOrderID, OrderDate, ROW_NUMBER() OVER (ORDER BY OrderDate) AS 'RowNumber'
        FROM Sales.SalesOrderHeader)
    FROM OrderedOrders
    WHERE RowNumber BETWEEN 5 AND 20

Open Query