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 do you understand by database schema and what does it hold?
How to convert characters to times in oracle?
What happens if the update subquery returns multiple rows?
What is ordinary table in oracle?
Name the various constraints used in oracle?
State some uses of redo log files?
How do you bind variables in oracle?
How to create additional tablespaces for an new database?
How to retrieve the count of updated rows?
What is set verify off in oracle?
What are the differences between lov and list item?
1) WIll all the user get the DEFAULT profile, if their current profile got deleted at any point of time? 2) What are the Situation we need to MOVE the TABLE between T.spaces? 3) What is the use of MOVING the TABLE between SCHEMA'S? 4) What are the Table Clause, Segment Clause and the Datafile Clause which will override each other? 5) Explain SORT_AREA_SIZE of Tempfile to make UNIFORM SIZE
How many types of tables supported by oracle?
What are the various types of snapshots ?
How to concatenate two text values in oracle?