SQL Query to find the Nth row in SQL 2005
SQL Query to find the Nth row in SQL 2005
CREATE procedure sample_procedure
@val int
as
select min(employeeid) from employees where employeeid in
(select Top @val employeeid from employees order by employeeid desc)
GO