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 the difference between truncate and drop statements? : Sql dba

1178


What is the difference between explicit and implicit cursors in oracle?

1114


What does trigger mean in slang?

1123


What is a sql profiler?

1063


How can you know that statistics should be updated?

1128


How to add, remove, modify users using sql?

1089


What mean sql?

1054


Can we connect to postgresql using sql developer?

1048


Differentiate between sga and pga.

1206


what are the security recommendations while using mysql? : Sql dba

1176


What is the maximum number of columns in sql table?

1228


Is primary key a clustered index?

1008


How many joins can you have in sql?

988


What is input buffer in sql*plus?

1292


what is the difference between clustered and non clustered index in sql? : Sql dba

1187