1DECLARE @Index INT;
2DECLARE @PageSize INT;
3
4SET @Index = 3;
5SET @PageSize = 5;
6
7SELECT * FROM
8 (SELECT ROW_NUMBER() OVER (ORDER BY EmpID asc) as MyRowNumber,*
9 FROM Employee) tblEmployee
10WHERE MyRowNumber BETWEEN ( ((@Index - 1) * @PageSize )+ 1) AND @Index*@PageSize