WITH table2 AS (SELECT (ROW_NUMBER() OVER (ORDER BY table1.someField ASC)) as rownum,* FROM table1) SELECT * FROM table2 WHERE rownum=5
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)