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 is mean by clustered index and non clustered index, give syntax of creation? : sql server database administration
What is difference between after and before?
What is measure group, measure? : sql server analysis services, ssas
What are subqueries in sql server?
What do you mean by data integrity?
Explain system rowset functions?
Where views are stored in sql server?
Explain what are the basic functions for master, msdb, model, tempdb databases?
Where are stored procedures in sql server?
What is default constraint in ms sql server?
Can you explain how long are locks retained within the repeatable_read and serializable isolation levels, during a read operation with row-level locking?
What are sp_configure commands and set commands?
What programming language would you use to create embedded functions in ssrs?
How to get a list of all tables with "sys.tables" view in ms sql server?
Explain about analysis services?