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 a functions and types in sql server?

1092


What are the differences between sql server and mysql.

1102


How to download and install microsoft .net framework version 2.0?

1143


What is the maximum row of a size?

1021


What is the difference between a "where" clause and a "having" clause?

1164


What is ddl and dml commands?

912


How to write character string constants or literals in ms sql server?

1031


What is the meaning of resultset type_scroll_insensitive?

956


What are the differences between having and where clause.

971


code to create procedure for taking databse backup in sql server or i have the query for it but what it's query returns means i want to show on my jsp that the databse backup has been taken on the basis of that return value.does it returns 0 or 1.wat is the code for that

2223


Do you know what is a with(nolock)?

1063


How you trouble shoot when any job fails

1938


Define tool Manage Statistics in SQL Server 2000 query ?

1099


What is indexed view? How to create it?

1020


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

1105