What would be the result of the following query? SELECT TOP 1 salary FROM (SELECT DISTINCT TOP 6 salary FROM employee ORDER BY salary DESC) a ORDER BY salary

Back to Questions
A)

Gets the 6th highest salary of the employees

B)

Gets the top salary of the employee

C)

None of the above

 

Author Explanation :

The query would give the 6th highest salary of the employee

Answers Posted

PostedBy By: Abhishek Kumar, at 06:49 PM on 07-July-2019

Answer Posted: A

Explanation: A

Result: Correct

PostedBy By: Saikiran K, at 03:53 AM on 20-April-2019

Answer Posted: A

Explanation: abc

Result: Correct

PostedBy By: Srinivasan Baskaran, at 02:17 AM on 09-April-2019

Answer Posted: A

Explanation: Top 1 will give only one row from the resultset which results in the top 6 highest salaries from the subquery. The outer query will fetch the last record of the subquery which is the 6th highest salary.

Result: Correct

PostedBy By: sunkara ganesh, at 09:54 AM on 08-April-2019

Answer Posted:

Explanation: Get top 1 Sal

Result: Wrong Answer

Back to Questions

© Copyright 1997 - 2019 | www.bestdotnettraining.com | www.deccansoft.com | All Rights Reserved.
 
Bestdotnet google plus
Enquiry Now