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

Write a query to delete duplicate records in SQL SERVER

Answer Posted / vinod singh kushwah

Delete From Tablename where(ID Not in (Select max(ID) from
Tablename Group by name))

Tablename :Friend

ID Name Age city
101 vinod 22 Gwalior
102 Pritesh 23 Gwalior
102 Pritesh 23 Gwalior
103 Arvind 24 Gwalior


Here Id-102 is repeated so friend if u want to delete this
duplicate raw Try Above code in Sql-sever

Is This Answer Correct ?    4 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the primary use of the model database?

1141


How to provide default values to function parameters?

1239


When should you use an instead of trigger?

1036


Equi join and non equi join is possible with sql server?

1116


How to convert character strings into numeric values?

1175


How can I check that whether automatic statistic update is enabled or not?

1102


How do I find the sql server version?

1096


What are wait types?

1225


How to rebuild the master database?

1150


How to connect php with different port numbers?

1163


What is sql or structured query language?

1208


What are the pros and cons of putting a scalar function in a queries select list or in the where clause?

1283


How do I create a trace in sql server?

1104


What is a scheduled job or what is a scheduled task?

1027


What are the different subsets of sql?

1635