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 do you mean by “trigger” in sql?

1130


What is sql used for?

1166


What is the function that is used to transfer a pl/sql table log to a database table?

1069


What is a full join sql?

1105


Which is faster count (*) or count 1?

1088


what is table? : Sql dba

1109


What is the use of pl/sql table?

1106


How many sql are there?

1053


what is transaction? : Sql dba

1063


how can I make a script that can be bi-language (supports english, german)? : Sql dba

1068


How do I run a script in sql developer?

999


What is cascade in sql?

1017


If the application is running very slow? At what points you need to go about the database in order to improve the performance?

1053


how to include numeric values in sql statements? : Sql dba

1149


what is query cache in mysql? : Sql dba

1081