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 retrieve the top 2 salaried persons from a database?

Answer Posted / arun

select salary from(select salary from(select distinct salary from employees order by salary desc) where rownum<=2 order by salary) where rownum=1;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does left join work in sql?

983


What is an escape character in sql?

1008


How can a function retun more than one value in oracle with proper example?

1061


How is sql used in oracle?

993


Explian rowid, rownum? What are the psoducolumns we have?

984


How delete all records from table in sql?

958


What is mutating error?

950


What is sql select statement?

1013


What is java sql package?

1072


Do triggers have restrictions on the usage of large datatypes, such as long and long raw?

1151


Difference between truncate, delete and drop commands?

1062


What are the constraints available in sql?

1027


How do you get column names only for a table (sql server)?

1137


What are the conditions an underlying table must satisfy before a cursor can be used by a positioned update or delete statement? : Transact sql

977


What is sqlexception in java?

966