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

What is nested transaction?

1087


What is the meaning of resultset type_scroll_insensitive?

938


What is sql server 2000 work load governor?

1038


What is difference between index seek vs. Index scan?

1132


in the physical file layout, where should the transaction log be stored in relation to the data file?

974


How to check what was the last restore transaction LSN in Log shipping or Mirroring? when we don't have a Monitor or witness server.

3857


Why is there a performance difference between two similar queries where one uses union and the other uses union all?

1016


What stored by the model? : sql server database administration

935


What is a DBMS, query, SQL?

1031


What are built in functions?

982


What are the differences between union, intersect, and minus operators?

1065


What is inline variable assignment?

1002


What is set nocount on?

926


What happens if you delete a table that is used by a view?

974


How to create view in stored procedure sql server?

1003