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

List all types of constraints in sql server?

992


What is constraints and its types?

924


How many databases can we create in a single server?

207


What are data driven subscriptions?

112


Can a database be shrunk with users active?

1112


mention different types of relationships in the dbms?

1002


What is right outer join in sql server joins?

1158


Define inner join? Explain with an example?

963


How to optimize stored procedure optimization?

879


What happens when unicode strings concatenate with non-unicode strings?

1065


How many replicas are maintained for each sql azure db?

124


What is the data tier application?

169


How to edit table in sql server 2017?

906


how you can get the list of largest tables in a database? : Sql server administration

1029


What is the rdl file?

138