Monday 14 March 2011

Using ROW_NUMBER() Function Fetch Exact number of Row.

Fetch Exact 10th row from table where there is no primary key. 

select * from
(Select Emp_First_Name ,ROW_NUMBER() OVER(ORDER BY Emp_First_Name DESC) AS 'Emp' From Table)Qry Where Qry.emp = 10

No comments:

Post a Comment