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...

I Have Employee table having column name as ID,SALARY
how to get second max salary from employee table with id
ex
ID SALARY
1 20000
7 37000
2 5000

Answer Posted / sivanandam

SELECT ID,MAX(SALARY) FROM EMP
WHERE SALARY < SELECT MAX(SALARY) FROM EMP

Is This Answer Correct ?    6 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is RAID? What are the different types of RAID configurations?

1179


What is logon trigger?

1156


What does <> symbol mean?

1026


Define candidate key, alternate key, and composite key.

967


What is provisioning, billing and metering, and connection routing concepts in the service layer?

115


What are key constraints?

1014


How to select some specific columns from a table in a query in ms sql server?

1044


What are locks in sql?

1013


Why are sql functions used?

1181


Thanks to some maintenance being done, the sql server on a failover cluster needs to be brought down. How do you bring the sql server down?

995


Difference between connected and disconnected database in .net with sql server?

1147


how to create “alternate row colour”?

152


How to create sub reports?

251


Explain about sql server login?

1133


How to update a field in SQL after ALTERING a row?

1284