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

SELECT MAX(SAL) FROM EMPLOYEE WHERE SAL<(SELECT MAX(SAL)
FROM EMPLOYEE);

I don't think this will work correct me if i am
wrong.Correct one is-------

SELECT MAX(SAL) as SAL FROM EMPLOYEE WHERE SAL<(SELECT MAX(SAL)
FROM EMPLOYEE);

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 the difference between null value, zero, and blank space?

1196


What are the different types of constraints?

1169


Is sql better than access?

1009


What is the need of merge statement?

1033


What are tuples in sql?

1123


What does closing a cursor do?

1313


What is embedded sql with example?

1035


What's the difference between a primary key and a clustered index?

984


Explain autonomous transaction.

1152


How do I find duplicates in sql?

929


Which is faster joins or subqueries?

986


What is meaning of <> in sql?

1064


What is blind sql injection?

1063


Which join is default?

948


How many columns should be in an index?

959