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

Delete duplicate records from the table?(Table must have
unique id)

Answer Posted / brijesh darmwal, sandhya

DELETE FROM [MyDb].[dbo].[sandhya]
WHERE id
IN
(SELECT id
FROM
(SELECT MAX(id) as id,name,addr
FROM [MyDb].[dbo].[sandhya] GROUP BY name,addr having
count(id)>=2)
Tmp)

Is This Answer Correct ?    7 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain hostprotectionattribute in sql server 2005?

967


Explain indexes disadvantages?

1016


How to sort the query output with order by clauses in ms sql server?

990


What language is sql server written in?

993


What is the purpose of object explorer and its features? : sql server management studio

1138


What is the difference between stored procedure and user defined functions?

1143


Do you know what is openxml in sql server?

1024


What does nvl stand for?

913


what is the difference between Delete and Truncate command in SQL

1094


What are the events recorded in a transaction log?

943


What is analysis service repository?

975


Where sql server usernames and passwords are stored in a sql server?

941


What is the difference between osql and query analyzer?

944


How to recompile stored procedure at run time?

1021


Is it possible to import data directly from t-sql commands without using sql server integration services? If so, what are the commands?

1342