WITH cte (row,lastname,firstname,salary) AS( SELECT TOP 6 ROW_NUMBER() OVER (ORDER BY salary DESC), lastname, firstname,salary FROM salarytable ORDER BY salary DESC ) SELECT * FROM cte WHERE row=6;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)