Skip to content

Oracle Coding Questions - DSA Problems & Solutions

Practice Oracle placement paper coding questions with detailed solutions. Access Oracle OA coding problems in Java, C++, Python.

This page contains Oracle coding questions from Oracle OA placement papers with detailed solutions.

Oracle OA Coding Section:

  • Problems: 2-3 coding problems
  • Time: 90-120 minutes
  • Languages: C++, Java, Python

Question 1: SQL Query - Second Highest Salary

Section titled “Question 1: SQL Query - Second Highest Salary”
Q1: Write a SQL query to get the second highest salary from the Employee table.

Solution (SQL):

SELECT MAX(salary) AS SecondHighestSalary
FROM Employee
WHERE salary < (SELECT MAX(salary) FROM Employee);

Alternative Solution:

SELECT DISTINCT salary AS SecondHighestSalary
FROM Employee
ORDER BY salary DESC
LIMIT 1 OFFSET 1;

Practice Oracle coding questions regularly!