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 find the second highest salary from emp table?

Answer Posted / prudhvi

select sal from emp a where 1=(select count(*) from emp b where a.sal>b.sal);

Try this guys,if u want highest sal use 0 in where condition, for second highest 1,third 2........

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a composite primary key?

1085


What is sqlerrd?

967


How do I find duplicates in two columns?

1162


What is the starting oracle error number?

1051


What are pl sql data types?

1007


What are the advantages of indexing?

982


How do I delete a trigger?

962


Which language is used in sql?

1052


What are sql indexes?

997


What is optimistic concurrency control? : Transact sql

981


What are the syntax and use of the coalesce function?

1202


What is a constraint?

1019


What is sql and how does it work?

1166


discuss about myisam index statistics collection. : Sql dba

950


Is oracle and sql same?

1007