Java, Spring, Microservices, Interview, Coding.
salary 2.We can do that like this SELECT Salary FROM (SELECT DISTINCT Salary FROM Employee ORDER BY Salary desc) WHERE ROWNUM <= 2; 3.select (SELECT MAX(Salary) FROM Employee) maxsalary, (SELECT MAX(Salary) FROM Employee WHERE Salary NOT IN (SELECT MAX(Salary) FROM Employee )) as [2nd_max_salary]