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 are the limitations of sql express?

988


Why is sql important?

1026


What are hotfixes and patches?

889


How do I run sql?

1096


what is 'mysqld'? : Sql dba

909


What are the different types of a subquery?

983


what is the command line end user interface - mysql? : Sql dba

925


Is sql a oracle?

916


What does the base_object_type column shows in the user.triggers data dictionary view?

1000


Is pl sql and postgresql same?

1058


Explain the update statement in sql

918


What is sqlca in powerbuilder?

956


How many postgresql users are there, worldwide?

994


What are the types of keys?

935


How does sql developer connect to oracle database?

950