how to delete duplicate rows in sql server2005
Answer Posted / enis ertem
with DeleteDups as
(
Select * from TableA AS T1
where KeyCol <
(Select Max(Keycol) from TableA as T2
where t1.Id = T2.ID)
)
Delete from Delete Dups;
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
When we should use and scope of @@identity?
What is optimization and its types?
What is table join?
What is clustered vs nonclustered index?
What is the difference between a local and a global temporary table?
If no size is defined while creating the database, what size will the database have?
How raid can influence database performance?
When is update_statistics command used?
What is #temp and @table variable in SQL server?
How you can change the database name in SQL SERVER?
What are difference between Cluster index and Non-Cluster index?
What are the steps to insert a table?
What are system databases in ms sql server?
What do you think of this implementation? Can this be implemented better?
What is the difference between grant and with grant while giving permissions to the user?