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 / nalini

Follow the following Query, You get the second highest
salary.
SQL> Select level,Max(sal) from emp
Where level=&level connect by prior sal>sal
group by level;
SQL> Enter the level No=2 (Here enter 2 manually)

Then you will get the 2nd highest salary.
If you want 3rd Highest salary, then enter level no=3.

Is This Answer Correct ?    208 Yes 105 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are all the common sql functions?

1084


Which data type is a composite type?

1037


Why we use joins in sql?

1036


What are the disadvantages of file system?

1364


What is the maximum database size for sql express?

1073


Does sqlite need a server?

1097


what are the maximum number of rows that can be constructed by inserting rows directly in value list? : Transact sql

1008


Does db2 use sql?

1009


What are the basic techniques of indexing?

1115


How do I view stored procedures?

1023


what is msql? : Sql dba

1044


What is sql integrity?

1248


What does cursor do in sql?

1067


Does group by remove duplicates?

1092


What is sql profiler in oracle?

1162