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
How do we upgrade from SQL Server 6.5 to 7.0 and 7.0 to 2000?
What are the types of processing and explain each? : sql server analysis services, ssas
Which tcp/ip port does the sql server run on? How can it be changed?
Explain syntax for dropping triggers?
Where is localdb stored?
Why do we partition data?
Explain differentiate between a having clause and a where clause?
Explain contrast amongst grouped and non-bunched records?
Do you know the policy based administration feature of sql server 2008?
Is sql server implemented as a service or an application? : Sql server database administration
How do I find information about the install locations for the various instances running on a computer?
What is a rownum?
I have all the primary data files, secondary data files as well as logs. Now, tell me can I still restore the database without having a full backup? : sql server database administration
What’s the use of custom fields in report?
What are the steps to insert a table?