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 |
characters of DBMS A) non redundant B) data independence C) increased security D) all the above
How to do Stored procedure testing? Who does this testing (Developer or tester)?
What do you mean by database?
Write a query to get maximum and second maximum in oracle?
Explain various types of locks in a transaction? Which is better and why?
What is the difference between specialization and generalization?
What is the difference between primary key, foreign key and candidate key?
diff b/w inter process and in process
List some advantages of dbms.
What is database and its types?
How to implement database security?
List the properties of a transaction.