Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to check the 3rd max salary from an employee table?

Answer Posted / a.brahmam

select * from(select rownum r,sal from(select * from table name order by sal desc))
where r=3;
(or)
select * from(select rownum,sal from table name order by sal desc)
where rownum<=3
minus
select * from(select rownum,sal from table name order by sal desc)
where rownum<=2
(or)
select * from(select sal,dense_rank()over(order by sal desc)r from table name)
where r=3

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a trigger word?

964


What is the default isolation level in sql server? : Transact sql

964


What are the most important ddl statements in sql?

1027


how to run 'mysql' commands from a batch file? : Sql dba

1063


What are few of the schema objects that are created using PL/SQL?

971


Mention what does plv msg allows you to do?

1053


what is denormalization. : Sql dba

1045


Explain exception handling in pl/sql?

990


Is ms sql traffic encrypted?

875


How can we implement rollback or commit statement in a trigger?

981


How do you bind variables in pl sql?

1036


what is data integrity? : Sql dba

988


Are there any features that are decommissioned in 11g that are not present in 11g?

2069


What is difference between inner join and cross join?

912


What sql database should I use?

1075