Thursday, 4 June 2015

How to get data between start from specific row and specific no of records in sql.

 =>Like MSSQL NO OFFSET and FETCH NEXT key words in SQL Server. So if we want to get data start from specific row we need to use Derived table.

Ex.

SELECT keyname
FROM
(
SELECT keyname,ROW_NUMBER() OVER (ORDER BY Id) AS rowno FROM CONFIG_ApplicationConfigValues
) AS T
WHERE T.rowno between 11 and 20


No comments:

Post a Comment