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 are different types of sql?

1182


What are the different types of a subquery?

1044


How we can update the view?

1049


Which is better join or inner query?

1043


What is difference between rank () row_number () and dense_rank () in sql?

1101


how to use case expression? : Sql dba

1022


Where is all the data on the internet stored?

1007


what is query cache in mysql? : Sql dba

1032


what is rdbms? : Sql dba

1012


What is the difference between partition and index?

983


What is a temporal table?

928


what does the t-sql command ident_current does? : Transact sql

977


How can we make an if statement within a select statement?

1010


what is a materialized view? : Sql dba

1061


What is sql stand for?

981