Most Intelligent
Software Engineer
Tuesday, January 24, 2012
Find highest Nth Salary in salarytable
way1::
SELECT min(salary) FROM (
SELECT DISTINCT TOP N salary FROM tblSalary ORDER BY salary DESC) tblsalary
way2::
select min(salary) from tblsalary where salary in ( select distinct top n salary from
tblsalary order by salary desc )
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment