Write a SQL query to get the second highest salary from the Employee table.
| Id | Salary |
| 1 | 100 |
| 2 | 200 |
| 3 | 300 |
<
SELECT id, MAX(salary) AS salary
FROM employee
WHERE salary IN
(SELECT salary FROM employee MINUS SELECT MAX(salary)
FROM employee);
You can try above code to find 2nd maximum salary. The above code uses MINUS operator. For further reference use the below links https://www.techonthenet.com/sql/minus.php https://www.geeksforgeeks.org/sql-query-to-find-second-largest-salary/