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
Can you tell me some of the common replication dmv's and their use? : sql server replication
Why truncate is ddl command?
What is 1nf 2nf?
What is the difference between function and stored procedure in sql server?
You want to use a perspective in an mdx query. How do you select the perspective?
What is side by side migration in sql server?
What is difference between global temporary tables and local temporary tables?
Differentiate between sql temp table vs table variable?
What is the significance of null value and why should we avoid permitting null values?
What are the limitations/drawbacks or ssrs 2008 r2?
Name 3 ways to get an accurate count of the number of records in a table?
How to drop existing indexes in ms sql server?
What are commonly used mssql functions in php?
How do I view a script in sql server?
What is clustered index