View Single Post
  #15 (permalink)  
Old 05-06-2008, 08:32 AM
Unregistered
 
Posts: n/a
Default ANY answer. Re: i want to get the third highest salary from a table?

Consider the Table Salary_TB with 2 columns empname,salary

SQL
----
[sql]select top 1 (salary) from Salary_TB where salary< (select max(salary) from Salary_TB where salary<(select max(salary) from Salary_TB ) ) order by salary desc[/sql]

i think this can understand all to get third highest salary from a table

Anoop.G
3MenTechnologies
9847160368
anoop.gs@gmail.com
Reply With Quote