how to delete duplicate rows from table in sql server
Answer Posted / gerry
delete from my_table where my_primary_key in
(select a.primary_key from my_table a, my_table b
where not a.my_primary_key = b.my_primary_key
and [insert restriction that makes the 2 rows the same]
)
Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
What is the difference between row_number and dense_rank?
What is an index. What are the types?
What is service broker?
What is a fill factor?
How retrieve field names from the table in SQL through JAVA code?
How does normalization work?
How do you manipulate data?
What is the difference between coalesce() & isnull()?
How to connect of datebase with sql express.?
What are the types of subquery?
What is 2nf in normalization?
Why use view instead of a table?
What is change data capture (cdc) feature?
Can we perform backup restore operation on tempdb? : sql server database administration
If a user does not have permission to a table, but has permission to a view created on it, will he be able to view the data in table?