Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


write a query for the fifth highest salary?

Answers were Sorted based on User's Feedback



write a query for the fifth highest salary?..

Answer / arshi

SELECT MAX(Salary) AS Expr1
FROM TableName
WHERE (Salary NOT IN
(SELECT TOP (4) MAX(Salary)
AS Expr1
FROM TableName AS
TableName_1
GROUP BY Salary
ORDER BY SalaryDESC))

Is This Answer Correct ?    6 Yes 7 No

write a query for the fifth highest salary?..

Answer / ramesh

select top 1 salary

(select distinct top 5

salary from employees

order by salary desc)

a order by salary

Is This Answer Correct ?    6 Yes 9 No

write a query for the fifth highest salary?..

Answer / sujit

Hop it helps!

Select sal from (select sal from emp order by sal desc
where rownum<6);

Is This Answer Correct ?    0 Yes 3 No

write a query for the fifth highest salary?..

Answer / payal

select salary from emp order by salary desc limit 4,1

Is This Answer Correct ?    3 Yes 10 No

write a query for the fifth highest salary?..

Answer / aravind

select * from (select sal from emp order by desc) emp where
rownum = 5

Is This Answer Correct ?    6 Yes 14 No

write a query for the fifth highest salary?..

Answer / p.chella vijaya

select top 5 (salary) from emp order by desc

Is This Answer Correct ?    1 Yes 13 No

write a query for the fifth highest salary?..

Answer / p.chella vijaya

select top 5 (salary) from emp order by salary desc

Is This Answer Correct ?    1 Yes 14 No

Post New Answer



More Databases AllOther Interview Questions

WHAT IS CARDINALITIES OF JOIN?

0 Answers  


CLI stands for?

3 Answers   IBM,


What is the advantage of varchar2 over char?

0 Answers   ADITI,


Please post the scenerois for writing the complex sql queries , for my practice.Can be any query if you cannot solve.

0 Answers  


What is Stored procedure ?

4 Answers   IBM, iGate, Inspira Technologies,






aht is the difference b/w network & hierarchial & relational dbms????

0 Answers  


Source File: Target EMPNO, SAL Empno, Format 101, 1000 101, 1000 101, 1100 101, 1000, 1100 101, 1000 101, 1000, 1100, 1000 101, 10000 101, 1000, 1100, 1000, 10000 102, 1100 102, 1100 102, 1300 102, 1100, 1300 102, 1200 102, 1100, 1300, 1200 102, 1500 102, 1100, 1300, 1200, 1500 How can i get that output using datastage(ETL) tool

0 Answers   Miracle Software,


can u combine pipeline parallelism and partition parallalism? how and whan?

0 Answers   TCS,


What is meant by distributed system?

0 Answers  


How to fetch/retrieve the data from hieranchical database and put it into the relational database? for e.g I want to extract the data from IMS DB2 database which is a hierarchical db and load that data into the relational database which is a SQL server.Are there any tools available for directing extracting data from hierarchical db and loading into the relational database (SQL server)?

0 Answers  


After normalization, what are the conditions which have to keep in mind to de-normalize it?

0 Answers   C DAC, CDAC,


plz suggest me the books for the preparation of NIC written exam.

4 Answers   NIC, Rolta,






Categories