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 / elumalai.k

select id,max(salary)from employee where salary<(select
max(salary)from employee)

Is This Answer Correct ?    15 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How will you monitor replication activity and performance? What privilege do you need to use replication monitor? : sql server replication

1016


what is the information that can be stored inside a bit column? : Sql server database administration

904


Explain system views?

1024


Can a table have 2 primary keys?

933


can an order by clause be used in a creation of a view?

1102


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

2168


what are different types of raid configurations? : Sql server database administration

995


what are the core components of SSRS?

121


If I delete a template from the list in sql studio, will it be deleted from the hard disk? : sql server management studio

935


How to remove duplicate rows from table except one?

941


How to write the storeprocedure with in the store procedure? and how can we write the store procedure with in a trigger vice versa? plz post me the exact answer?

2533


Explain multiserver query

964


how would you write a sql query to compute a frequency table of a certain attribute involving two joins? What changes would you need to make if you want to order by or group by some attribute? What would you do to account for nulls?

1577


Define inner join in sql server joins?

991


What do you understand by check constraint in sql server?

890