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

What is bcp? When does it use?

989


What is replication and database mirroring?

1089


What is logshipping and its purpose?

1066


How to set database to be single_user in ms sql server?

1082


what is the system function to get the current user's user id? : Sql server database administration

1072


Mention what are the different types of ssrs reports?

158


What is the difference between MVC and Teir Architecher? Plz explain with Layyered Programming example...? Thanks

2137


How to rebuild master databse?

1128


Write a program to fetch first 10 records from a file?

1063


What is set nocount on and what is set nocount off?

995


What is difference between Datepart() and Datename() in SqlServer?

1259


as a part of your job, what are the dbcc commands that you commonly use for database maintenance? : Sql server database administration

951


What is the tcp/ip port on which sql server runs?

1242


What are a database and a data warehouse?

1073


What is DCL?

1104