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

Can we commit in trigger?

988


What is the difference between the repeatable read and serializable isolation levels? : Transact sql

1114


Explain ttitle and btitle.

1127


Can we write ddl statements in functions?

1128


Can primary key be changed?

915


Is sql considered coding?

1050


What are the different ddl commands in sql?

1182


What is cost in sql execution plan?

996


What do you understand by pl/sql cursors?

1097


What is difference between table and view?

1074


What is the syntax to add a record to a table?

1100


How long will it take to learn pl sql?

947


what is cross join? : Sql dba

1009


What is an exception in PL/SQL? What are the two types of exceptions?

1326


what is the difference between rownum pseudo column and row_number() function? : Sql dba

1097