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
What are the components of sql server service broker?
What is the Difference Between Primary and Foreign Key?
What is the recovery model? List the types of recovery model available in sql server?
What are the main sources of data?
What are the essential components of sql server service broker?
What is the security model used in sql server 2005?
What is plan freezing?
How to delete a database in ms sql server?
Do you know what are the differences between lost updates and uncommitted dependencies?
How to provide default values to function parameters?
what is the maximum size of a row? : Sql server database administration
Write the queries for commands like Create Table, Delete table, Drop Table etc.
Which is the best place or learning center for MS SQL?????In Bangladesh?????
What is key attribute?
Explain subquery and state its properties?