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 rollback delete command?

939


What is record type in pl sql?

941


does sql support programming? : Sql dba

994


What is the trigger in sql?

906


Can you join a table to itself?

1035


How can check sql version from command line?

1014


What are the operators used in select statements?

1003


What is field delimiter?

991


Which sql most popular?

939


What is 19 null in sql?

900


What pl/sql package consists of?

1033


What is a primary key sql?

995


What is the difference between alter trigger and drop trigger statements?

1044


What is oracle and pl sql?

1082


When a dml statement is executed, in which cursor attributes, the outcome of the statement is saved?

1047