how to delete duplicate rows from table in sql server
Answer Posted / debasish
while @@rowcount != 0
begin
delete top (1) test where columnname in
(
select columnname
FROM tablename
GROUP BY columnname having count(*)>1
)
end
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
How ssrs maintain security?
SQL Server Architecture ?
What are the main differences between #temp tables and @table variables and which one is preferred?
How can you hide the sql server instances?
What are joins in sql and what are the different types of joins?
What types of Joins are possible with Sql Server?
what are candidate key, alternate key and composite key? : Sql server database administration
Is sql server difficult to learn?
What are the joins in sql server? : sql server database administration
What is a transact-sql statement?
What are the source of constraints?
Explain microsoft sql server functions?
What is the difference between the 2 operating modes of database mirroring?
Do you know sql server 2008 introduces automatic auditing?
Is there any difference between the primary key and unique key?