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

What does it mean to manipulate data?

1002


What command would you use to create an index?

1056


How to select some specific columns from a table in a query in ms sql server?

1005


What do you mean by acid?

1002


What is the difference between cartesian product and cross join?

867


Define left outer join in sql server joins?

969


Which language is supported by sql server?

1018


Can group by be used without aggregate functions?

925


What is bulkcopy in sql?

949


what is hash nonclustered index

970


Explain raiserror in sql server?

1031


What is the largest component inside a field?

1130


Benefits of Stored Procedures?

976


What is transaction server distributed transaction?

1061


What are cursors in ms sql server?

1183