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 do I kill a query in postgresql?

1010


What is database white box testing and black box testing?

1045


How do I save a sql query?

961


What is sharding in sql?

915


How consistent is the view of the data between and within multiple sessions, transactions or statements ?

2167


What are all ddl commands?

1011


What are literals in sql server?

1067


What do you understand by case manipulation functions?

951


How many types of normalization are there?

894


How do you select unique values in sql?

933


Can we use pl sql in sql server?

1008


What does varchar include?

904


Explain the steps needed to create the scheduled job?

965


How do you optimize a stored procedure query?

936


Explain clause in sql?

955