Getting Bottom N Records

Posted by vishalneeraj-24503 under Sql Server category on | Points: 40 | Views : 895
Using CTE,we can get Bottom Nth records like below query:-

with emp_record as
select top 10 e.*
from employee_master e
order by e.created_date desc

select top 10 * from emp_record order by created_date;

Here i have taken only top 10 record,but you take of your choice.

Comments or Responses

Login to post response