SELECT TOP 1 Salary FROM Employee WHERE Salary<(SELECT MAX(Salary)FROM Employee) Order BY Salary DESC
Lack of homework before asking question, looks like that you want to know the second highest number in SQL or MySQL.
Try something like this -
SELECT MAX( col ) FROM table WHERE col < ( SELECT MAX( col ) FROM table )
You can try this. "SELECT max(salary_obtained) FROM organization_tbl WHERE salary_obtained <( SELECT max(salary_obtained) FROM organization_tbl)".
How we can get nth max salary from Employee Table (EMP_ID, Salary)
Emp_id salary 1 1000 3 2000 4 16000 2 10000 7 19000 8 12000
e.g. for 3rd max salary, salary is 12000 so answer will be emp_id : 8