SELECT t .Id, t .Name, t .Address, t .PostNumber, t .CustomerLevel, t .Email,
t .rownum
FROM (SELECT Id, Name, Address, PostNumber, CustomerLevel, Email, Row_Number()
OVER (ORDER BY Id) AS rownum
FROM dbo.T_Customers) AS t
WHERE t .rownum > @startRowIndex AND
t .rownum <= @startRowIndex + @maximumRows
t .rownum
FROM (SELECT Id, Name, Address, PostNumber, CustomerLevel, Email, Row_Number()
OVER (ORDER BY Id) AS rownum
FROM dbo.T_Customers) AS t
WHERE t .rownum > @startRowIndex AND
t .rownum <= @startRowIndex + @maximumRows