Saturday, May 8, 2010

Selecting second maximum salary of employee table

SELECT MAX(SALARY) FROM EMPLOYEE WHERE SALARY < (SELECT MAX(SALARY) FROM EMPLOYEE)

2 comments:

  1. Hi, I have given the process in detail in the following article:

    http://www.indiastudychannel.com/resources/113005-Selecting-Second-Maximum-Salary-from-Employee-Table-Oracle.aspx

    ReplyDelete
  2. select max(salary) from employee where salary not in(select max(salary) from employee) ... ;)

    ReplyDelete