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
Mention the uses of stored procedures.
What are user-defined functions (udfs) in sql server?
Define full outer join in sql server joins?
What is a unique key constraint?
How to use old values to define new values in update statements in ms sql server?
How to make remote connection in database?
Can a table be moved to different filegroup?
How can you check the level of fragmentation on a table?
How to get the definition of a stored procedure back?
Explain logical operators in sql server?
What structure can you implement for the database to speed up table reads?
What is sub query and its properties?
What is role playing dimension with two examples? : sql server analysis services, ssas
How to list all schemas in a database?
What are different type of Collation Sensitivity?