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

if 3 duplicate records in a table,i want to delete 2 duplicate
records by keeping 1 duplicate and 1 original as it is,how?

Answer Posted / amol maske

DELETE FROM tablename WHERE ROWID NOT IN(
SELECT MIN(ROWID)FROM tablename GROUP BY columnname);

Is This Answer Correct ?    5 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you tell me some of the common replication dmv's and their use? : sql server replication

870


Why truncate is ddl command?

993


What is 1nf 2nf?

962


What is the difference between function and stored procedure in sql server?

987


You want to use a perspective in an mdx query. How do you select the perspective?

231


What is side by side migration in sql server?

1020


What is difference between global temporary tables and local temporary tables?

1176


Differentiate between sql temp table vs table variable?

830


What is the significance of null value and why should we avoid permitting null values?

914


What are the limitations/drawbacks or ssrs 2008 r2?

129


Name 3 ways to get an accurate count of the number of records in a table?

965


How to drop existing indexes in ms sql server?

1013


What are commonly used mssql functions in php?

998


How do I view a script in sql server?

976


What is clustered index

951