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 / deepa

drop table #temp
select top 2 identity(int,1,1) as SlNo, *
into #temp from employee order by salary desc
select * from #temp where SlNo = 2

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain contrast amongst grouped and non-bunched records?

1032


How do you create type- insensitive operator?

1048


In what sequence sql statement is processed?

1017


What are different types of subquery?

1250


What does sql server mean?

1077


What is report rendering ?

162


How do you rename a table in sql server?

1034


what is the difference between delete table and truncate table commands? : Sql server database administration

1041


Tell me what is the order in which the sql query is executed?

957


What are the two modes of authentication in sql server?

1075


How to delete existing triggers using "drop trigger"?

1060


Using the customer, and order table in northwind database, please write a query to produce xml?

1082


Is there any difference between primary key and unique with the not null condition?

956


What is exporting and importing utility?

1094


What do you understand by integration services in sql server?

968