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 are the basic functions for master, msdb, model, tempdb and resource databases? : SQL Server Architecture

993


How to fine-tune reports?

266


What happens when converting big values to numeric data types?

1115


Which are ddl commands?

1035


Is sql server is free?

970


What are the dmvs?

1005


How many ways to create table-valued functions?

972


How do we know if any query is retrieving a large amount of data or very little data?

966


What are the restrictions while creating batches in sql server?

1054


Explain about extended stored procedure?

928


Is there any difference between primary key and unique with the not null condition?

939


What stored by the msdb?

989


What is de-normalization and what are some of the examples of it?

969


What is sqlservr.exe - process - sql server (sqlex?press)?

1098


What does man by sql wildcard characters in sql server?

1050