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 / rajesh

Guess this works...

select max(sal)
from (select * from emp
where sal not in (select max(sal) from emp))

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is a scheduled jobs or what is a scheduled tasks? : Sql dba

965


Is ms sql is free?

1025


What is difference between group by and partition by?

1062


What are the disadvantages of not performing database normalization?

1167


What has stored procedures in sql and how we can use it?

1082


What are the types of dbms?

975


What is structural independence and why is it important?

1031


how to get help information from the server? : Sql dba

944


what is self-join? : Sql dba

1169


What are all different types of collation sensitivity?

1035


How to fetch alternate records from a table?

1245


what are date and time functions in mysql? : Sql dba

980


How do I view a sql trace file?

1035


what are different types of collation sensitivity? : Sql dba

1069


How to test for null values?

1056