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

select *
from (select ename,empno,salary,dense_rank()over(order by
salary desc) rank from emp)
where rank =2

Is This Answer Correct ?    19 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

1069


What is the difference between delete and truncate commands?

1050


what is the difference between ereg_replace() and eregi_replace()? : Sql dba

1166


what are the differences among rownum, rank and dense_rank? : Sql dba

1045


explain normalization concept? : Sql dba

1053


Should I use mbr or gpt?

1033


What jobs use sql?

987


what is “go” in t-sql? : Transact sql

1117


What are procedures used for?

992


What is pl sql package?

1041


What is scalar function?

1058


Is there any restriction on the use of union in embedded sql?

1164


Why we use pl sql?

968


What is query optimization in sql?

990


What has stored procedures in sql?

1070