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 / vijay kintali

select e1.ename,e1.sal from emp e1 where n=(select count
(distinct e2.sal) from emp e2 where e1.sal<=e2.sal);

Note:n here is nth highest salary.......

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I pipe the output of one isql to another?

1003


What are stored procedures used for?

1001


How to start oracle sql developer?

1032


List out the acid properties and explain?

949


Explain locks? : Transact sql

997


What is the use of & in pl sql?

1044


Does sql require a server?

1006


What are different types of keys?

1100


what is self-join? : Sql dba

1156


Describe types of sql statements?

1055


What is sharding in sql?

972


What is a constraint?

1019


what are the 'mysql' command line arguments? : Sql dba

1137


Is sql difficult?

1150


What is a temporal table?

927