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 / sujit kumar suman,new delhi

DELETE DUPLICATE RECORDS FROM TABLE IN SQL SERVER:

DELETE FROM TABLE1
WHERE
ID NOT IN
(SELECT MAX(ID) FROM TABLE1
GROUP BY NAME)

WHERE ID IS IDENTITY FIELD AND NAME IS DUPLICATE FIELD

TRY THIS QUERRY AND ENJOY.......

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 the parts of a function?

876


What can be used instead of trigger?

1099


Define tempdb database?

944


What is in place upgrade in sql server?

990


How can we check the sql server version?

983


What is normalization 1nf 2nf 3nf?

1004


Why we use trigger in sql server with example?

919


How to call a function from a stored procedure in SQL Server ?

955


How to test subquery results with the exists operator?

1035


What are the steps to take to improve performance of a poor performing query? : sql server database administration

980


Why use “pivot” in sql server?

1045


Does index speed up select statements?

977


Explain primary key in sql server?

974


What are data regions?

121


Can you explain what is indexed view? How to create it?

854