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
Calculate difference between 2 date / times in oracle sql?
Explain the characteristics of oracle dba?
How to rename an index?
What is an oracle database?
How to define an oracle cursor variable?
How to define a specific record type?
How to create a server parameter file?
How can we find out the duplicate values in an oracle table?
what is the scenario where you take the database to NoArchivelog mode?
Tab A A B ------ 1 A 2 B 3 C Tab B A B ----- 4 D 5 E 6 F Generate the value into B table from A table. Only table A has the value. Write the SQL query to get B table value.
How would you configure your networking files to connect to a database by the name of DSS which resides in domain icallinc.com?
Explain the use of record option in exp command.
How to use in conditions in oracle?
Point the difference between translate and replace?
What is a relational database management system?