Delete duplicate records from the table?(Table must have
unique id)
Answer Posted / kk
DELETE
FROM MyTable
WHERE ID NOT IN
(
SELECT MAX(ID)
FROM MyTable
GROUP BY DuplicateColumn1, DuplicateColumn2, DuplicateColumn3)
| Is This Answer Correct ? | 7 Yes | 7 No |
Post New Answer View All Answers
How to automatically create a log when an exception is being received into SQL Server?
Explain encryption of entire databases without the need for application changes in sql server 2008?
How to use subqueries with the in operators in ms sql server?
What are page splits?
How to convert a unicode strings to non-unicode strings?
How to create stored procedures with parameters in ms sql server?
Issues related in upgrading SQL Server 2000 to 2005 / 2008
what is checksum in sql server.........???
Explain table valued parameters in sql server? Why tvp used?
Why we need to use secondry database file? though, we can do same work using primary database file also.
What is reportserver and reportservertempdb ?
Where does the copy job runs in the log shipping primary or secondary? : sql server database administration
How do I view a script in sql server?
How to find index size for each index on table?
what are the Prerequisites for Replication?