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...

1. How to fetch all the duplicate records from the table.

2. How to fetch the second highest salary from the table.

Answer Posted / ashwini

2. Second highest salary from the table

select top 1 salary from emp where salary NOT IN
(SELECT MAX(salary) FROM emp)order by salary desc

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are various limitations of the views?

1055


What is 2nf in normalization?

998


How to drop an existing schema in ms sql server?

1103


How many types of attribute relationships are there? : sql server analysis services, ssas

1079


List out the differences between global and local temp tables in sql server?

1062


How to list all stored procedures in the current database using ms sql server?

1136


What is pessimistic concurrency?

976


Explain what are the restrictions that views have to follow? : SQL Server Architecture

1048


Can you explain how long are locks retained within the repeatable_read and serializable isolation levels, during a read operation with row-level locking?

986


how to use DTS package in 2000,2005,2008 in sql server

1838


What is it unwise to create wide clustered index keys?

1007


Why do we need normalization?

931


What is the difference between rank and dense_rank?

1090


What is difference between clustered index and non clustered index?

1078


Explain in brief about Microsoft SQL server?

1097