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 Sqlpaging in SqlServer 2005 ?
Explain what is the function of sql server agent windows service?
How to change server name in sql server?
What do you understand by check constraint in sql server?
What are the restrictions that views have to follow? : SQL Server Architecture
Explain linked server in sql?
Introduction of rollup clause using sum and group by clause?
Can you edit the .rdl code associated with a linked report?
Write a sql query to get zero records from a table having n number of records?
Due to some maintenance being done, the sql server on a failover cluster needs to be brought down. How do you bring the sql server down?
How to check if stored procedure is running in sql server?
Define model database?
What is named query? : sql server analysis services, ssas
Can sql servers link to other servers?
How can we call UDF(User Define Function) using C# code in ASP.net ?