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 / sudip mondal

select top 1 from employee where ID in (select top2 ID from
employee order by Salary desc) order by Salary asc

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why Master database is required?

1194


How to attach adventureworkslt physical files to the server?

1166


Write a code to select distinct records without using the DISTINCT keyword.

1186


What are the properties of sub-query?

1134


How to get nth highest salary from employee table.

1213


What is a functions and types in sql server?

1151


When we should use and scope of @@identity?

1052


Why I am getting "the microsoft .net framework 2.0 in not installed" message?

1059


What authentication modes does sql server support?

1156


Explain indexed views and partitioned view with their syntax.

1197


Define cursor locking

1063


What are “unrepeatable reads”?

1301


How to access the deleted record of an event?

1094


What is the fastest way to permanently delete a 1 million row table named customers?

1340


What is indexing explain it with an example?

1074