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 understand by physical_only option in dbcc checkdb?
Explain about SQL server 2005?
What are the steps to follow to configure SQL*Net?
Is resultset an interface?
What is resource governor in sql server?
Can foreign key be deleted?
can an order by clause be used in a creation of a view?
How many clustered indexes can be created on a table? I create a separate index on each column of a table. what are the advantages and disadvantages of this approach?
What is public role in sql server?
What is a ddl statement?
What is intellisense?
What is clustered vs nonclustered index?
How do you create an execution plan?
How to list all triggers in the database with sys.triggers in ms sql server?
Which tcp/ip port does sql server run on? How can it be changed?