Write a SQL query which should fetch the 5th maximum salary
of an employee from the table?
Answer Posted / vsandhyana
Hi Hashmatulla Baig,
I think your query will not give the desired output. it
should be modify please refer below for the same.
SELECT empno, sal
FROM
(
select empno, sal, (ROW_number() OVER (order by sal desc)) R
from emp
order by sal desc
)
WHERE R = 5;
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What are all the advantages of Cognos?
What are all the types of gateway used in Cognos?
What is set to be cardinality?
what is the use of backward drilling in cognos 8?is it possible?whats the uws of it?
What is the deployment requirements used in cognos?
Explain the different types of views used in cognos.
What is the use of powerplay web viewer in cognos?
What is looping and how to avoid it in framework manager?
What are the two types of framework manager?
WHAT ARE THE DISTNICT VARIABLES?
What is called materialized view?
What are the types of security?
What is the difference between low affinity and high affinity connections?
How create measures and dimensions?
difference between impromptu and cognos8