write a query for the fifth highest salary?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
Answer / payal
select salary from emp order by salary desc limit 4,1
Is This Answer Correct ? | 3 Yes | 10 No |
Answer / aravind
select * from (select sal from emp order by desc) emp where
rownum = 5
Is This Answer Correct ? | 6 Yes | 14 No |
Answer / p.chella vijaya
select top 5 (salary) from emp order by desc
Is This Answer Correct ? | 1 Yes | 13 No |
Answer / p.chella vijaya
select top 5 (salary) from emp order by salary desc
Is This Answer Correct ? | 1 Yes | 14 No |
WHAT IS CARDINALITIES OF JOIN?
Which is the best sorting method if i have to sort the students of Harvard University according to their first name?
What is the use of graph database?
write a query for the fifth highest salary?
17 Answers IBM, Matlabs, Ramco,
Given a table Employee which has columns name and salary, write an SQL query to find the employee with the second highest salary.
HOW PASS PARAMETERS FOLLOWING ORDER RPG-CL-RPG?
HOW WE PASS PARM PARAMETERS TO CL VARIABLES FROM RPGLE?
Is it possible to update AS400 database record while reading it with no lock
What is Data Modelling?
how to configure oracle 10g in java1.5 and tell me know how to set class path in system?
What will happen non-clustered index will be created on clustered index?
What is the difference between data source and database?