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 / mark berlin

-- Solution #3
select distinct salary from (
select salary,
RANK() OVER (order by salary desc NUlls last) as RRANK
FROM employees
)
Where RRANK = 2;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I speed up sql query?

968


What is the best free sql database?

1058


can a stored procedure call itself or recursive stored procedure? : Sql dba

1037


What are all the different types of indexes?

1153


how do you tune the slow running queries in oracle db , explain the methodology

2824


Is sql free?

975


What is rename command in sql?

1040


What is data type in sql?

970


Is sql a backend?

1031


Can we use the cursor's to create the collection in PL/SQL?

1031


How does postgresql compare to mysql?

1039


What is dialect in sql?

954


when MSQL8.0 is in market

2083


what are the maximum number of rows that can be constructed by inserting rows directly in value list? : Transact sql

960


How do I view a sql database?

1023