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
Explain what are the basic functions for master, msdb, model, tempdb databases?
What are the different editions available in sql server 2000?
How to handle error or exception in sql?
What are the types of joins in sql?
How to convert a table data in XML format in sql server?
Explain the steps to use transact-sql cursor?
What do you understand by user-defined function in the sql server?
What is database mirroring?
How to start sql server browser service?
Explain transaction isolation levels in sql server?
What is the usage of the sign function?
What is query optimization process?
Explain different types of lock modes in sql server 2000?
How can we determine what objects a user-defined function depends upon?
After creating the cube, if we added a new column to the oltp table then how you add this new attribute to the cube? : sql server analysis services, ssas