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...

Write a query to get 2nd maximum salary in an employee table ?

Answer Posted / sohail

select empno,ename,sal
from (select ename,empno,sal,dense_rank()
over(order by sal desc)topn
from emp)
where topn=2

Is This Answer Correct ?    69 Yes 46 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does select count (*) mean in sql?

1022


What are the types of subqueries?

1055


how many values can the set function of mysql take? : Sql dba

992


What is the difference between partition and index?

992


Can we commit inside a trigger?

998


what is a view? : Sql dba

1099


what is heap table? : Sql dba

1108


What are different types of indexes?

1012


How do I send sql query results to excel?

1070


what are all types of user defined functions? : Sql dba

1042


Is sql easier than java?

1018


How do I run a program in pl sql?

1007


What are schema-level triggers?

1104


What is trigger in pl sql with examples?

1048


What is dba in sql? : SQL DBA

1045