find out the third highest salary?
Answer Posted / suresh kumar
Hi every body,
I give the standard format Query for this type of top most
and who are the top n people in the organization like that
If we take EMP table
Select * from EMP A where &n= (select count (distinct
(sal)) from EMP B where B.sal>A.sal)
If we give n value 1 or 2 or 3….etc then we gets top one,
top second, and top third person details.
This same query can we use top n people who are earning
maximum salaries in the Organization
Select * from EMP A where &n> (select count (distinct
(sal)) from EMP B where B.sal>A.sal)
| Is This Answer Correct ? | 38 Yes | 19 No |
Post New Answer View All Answers
What happens if the update subquery returns multiple rows?
Explain a private synonyms?
What is truncate oracle?
Name the various constraints used in oracle?
How to export data with a field delimiter?
Is oracle a programming language?
What are the differences between char and varchar2 in oracle?
How to use subqueries with the in operator using oracle?
In oracle there is column command, how will you explain that?
what is the need of indexing topic in oracle? where do we use in a Java project? any other option other than using this to get the same result where we use indexing ?
Explain about achiever in sql?
Can u please explain me the Discussion on Except ,using cast like type cast. Question in the context of difference between two tables
What is the oracle implicit cursor?
What is the difference difference between $ORACLE_HOME and $ORACLE_BASE.
What happens to indexes if you drop a table?