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 is difference between truncate and delete?
What privilege is needed for a user to create tables in oracle?
How to bring a tablespace online?
What is an oracle table?
Please explain me all types of Data models. Also give me the details if each model can have other name.for example:schematic data model is also known as conceptual data model and entity relation data model.
Explain the use of online redo log files in oracle.
What is the data pump import utility?
Why do I get unexpected characters from 8-bit character sets in weblogic jdriver for oracle?
What are the various types of snapshots ?
How a database is related to tablespaces?
how do u setup a replication site?
Whether any commands are used for months calculation? If so, what are they?
How will you write a query to get a 5th rank student from a table student_report?
what are the default admin accounts in Oracle 10g ?
State and explain the different types of data models?