Question 11485 – APPSC-2012-DL CA
March 27, 2024
Question 11487 – APPSC-2012-DL CA
March 27, 2024
Question 11485 – APPSC-2012-DL CA
March 27, 2024
Question 11487 – APPSC-2012-DL CA
March 27, 2024

Database-Management-System

Question 367

To find the second highest salary from Employees table, which of the following query is true?

A
Select max (salary) from employees where salary = (select max (salary from employees where salary < (select max (salary) from employees);
B
Select min (salary) from (select salary from employees order by salary desc) where rownum ←2
C
Select max (salary) from employees where salary <
(select max(salary from employees)
D
Select max (salary) from employees where salary = (select salary from employees where rownum = 2 order by salary)
Question 367 Explanation: 
Select max (salary) from employees where salary < (select max(salary from employees) query gives the second highest salary from Employees table . The second query calculates the highest salary and then the first query selects the highest salary other than the already selected highest salary means the first query outputs the second highest salary.
Correct Answer: C
Question 367 Explanation: 
Select max (salary) from employees where salary < (select max(salary from employees) query gives the second highest salary from Employees table . The second query calculates the highest salary and then the first query selects the highest salary other than the already selected highest salary means the first query outputs the second highest salary.

Leave a Reply

Your email address will not be published. Required fields are marked *