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

What is meant by indexing?

1083


Explain having clause?

1028


What are the different subsets of sql?

1615


What is the ‘fillfactor’?

1013


Please illustrate physical database architecture? : SQL Server Architecture

1023


What does it mean if @@cursor_row returns a negative number?

1034


How to list all dsn entries on your local machine using odbc_data_source()?

1089


How to create a store procedure with encryption?

1051


What is indexing explain it with an example?

1066


How to set a database state to offline in ms sql server?

1102


How can you append an identity column to a temporary table?

1030


Do you know what is user defined datatypes and when you should go for them?

1007


What is a mutating table error and how can you get around it?

1125


How is a full-text index updated?

1000


What is encryption key?

137