Sunday, October 31, 2010

How we get second highest salary in database. Please show me this coding.

1)Select max(salary) from employee where salary!=(select max(salary) from employee);
(OR)
2)Select max(salary)from employee where salary < (select max(salary) from employee)
OR)
3)Select max(sal) from employee where sal not in(select max(sal) from employee)

No comments:

Post a Comment