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 / rajkumar v

Ans:1
select Column_Name from Table_Name group by Column_Name
having count(Column_Name )>1

Ans:2
salary - column name

SELECT TOP 1 salary FROM (SELECT DISTINCT TOP 2 salary FROM
Table_Name ORDER BY salary DESC) A ORDER BY salary

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When would you prefer to have a minimum number of indexes?

911


What is fill factor and pad index?

1017


What does top operator do?

1028


Can you use order by when defining a view?

980


How will you go about resolving deadlocks?

975


what's the information that can be stored inside a bit column? : Sql server database administration

1038


Can we use pragma autonomous_transaction in trigger?

963


What is difference between inner join and full join?

1071


What are the limitations in ssrs on sql server express edition?

187


To which devices can a backup be created and where should these devices be located? : sql server management studio

1051


what is bit datatype? : Sql server database administration

925


Define Joins?

1035


What are the pre-defined functions in the sql server?

1119


What will be query used to get the list of triggers in a database?

1005


How self join is different from outer join?

1124