/* Write your PL/SQL query statement below */


-- create a table
CREATE TABLE Employee (
    id INT, 
    salary INT,
    CONSTRAINT PK_STUDENT PRIMARY KEY (id)
);
-- insert some values
INSERT INTO Employee (id, salary) VALUES (1, 100);
INSERT INTO Employee (id, salary) VALUES (2, 200);
INSERT INTO Employee (id, salary) VALUES (3, 300);
INSERT INTO Employee (id, salary) VALUES (4, 400);
INSERT INTO Employee (id, salary) VALUES (5, 500);


-- SQL SOLUTION: 
-- SELECT salary FROM Employee ORDER BY salary DESC LIMIT 1 OFFSET 1;

-- ORACLE SOLUTION
select max(Salary) as SecondHighestSalary from Employee where Salary < (select max(Salary) from Employee);

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: