write a query for the fifth highest salary?
Answer Posted / piyush gupta
select distinct(a.sal) from emp a where 5=(select
count(distinct(b.sal)) from emp b where a.sal<=b.sal)
you can this query for nth highest salary
replace 5 with any number
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Explain various types of locks in a transaction? Which is better and why?
how to reject duplicates in source sequential file and if by filter option then where is that filter option in the sequential file.
What is the Difference Primary key and Unique Key
Explain buffer manager?
What is global database name?
Explain alternate key?
what is ad-hoc access? what is the diff b/w managed query and ad-hoc access?
What is database bounce?
Which is the most reliable programming language for RDBMS Relational Database Management System for Multi user applicaton. For PC application or web application ?
What is database client?
i have windows-xp processor with P4 system. whenever I tried to download foxpro for windows 2.6 on windows XP, my operating system failed to install foxpro for windows 2.6.please. how could i download , install & run foxpro for windows 2.6 easily on windows XP ?
What is a sequence? Explain it with one example?
What are different types of joins used in?
You are creating a Index on EMPNO column in the EMPLOYEE table. Which statement will you use?
What is ase database?