how to delete duplicate rows from table in sql server
Answer Posted / vineet dhamija
the best approach i came across in simple form too
just create a temporary table with the distinct values and
truncate this table than copy the values back and u r good to go
select distinct * into #temp from urtable
truncate table urtable
insert into urtable select * from #temp
drop table #temp
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What do you mean by cardinality?
Explain what are page splits? : SQL Server Architecture
What are the steps to insert a table?
When a primary key constraint is included in a table, what other constraints does this imply?
How to delete duplicate rows from table except one?
how many clustered indexes can be created on a table? : Sql server database administration
What are the types of subscriptions in SQL Server replication?
What is log cache in sql server?
What is dbcc? Give few examples.
What does the on update no action do?
Does transparent data encryption provide encryption when transmitting data across the network?
What is the current limitation of the size of SQL Azure DB?
Explain how to use linked server?
What’s the distinction between dropping a info and taking a info offline?
Which table keeps information about stored procedures?