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 / praveen kumar.dandu

select a.sal,rank from(select sal,rank() over (order by sal
desc))a where rank=&n




<Here after printing the ranks we can retrieve we can
retreive what ever the rank we want>

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is auto increment feature in sql?

1068


Why partition by is used in sql?

971


How do you break a loop in pl sql?

989


How can get second highest salary in sql?

911


how do you login to mysql using unix shell? : Sql dba

1018


how to rename an existing table in mysql? : Sql dba

1006


How do I add a database to sql?

1064


Can we commit inside a trigger?

945


Why do we use subquery?

944


How you can copy a file to file content and file to pl/sql table in advance pl/sql?

1094


How do I create a sql database?

950


What is the difference between sql and t sql?

966


Show the two pl/sql cursor exceptions.

1110


What is index example?

954


Why select is used in sql?

969